51 lines
1.7 KiB
HCL
Executable File
51 lines
1.7 KiB
HCL
Executable File
resource "oci_core_network_security_group" "load-balancer-public-nsg" {
|
|
compartment_id = var.ocid_compartment_networking
|
|
display_name = "public-load-balancer-nsg"
|
|
vcn_id = var.ocid_vcn_3_tier
|
|
}
|
|
|
|
resource "oci_core_network_security_group_security_rule" "nsg_lbr_security_rule_ingress_01" {
|
|
network_security_group_id = oci_core_network_security_group.load-balancer-public-nsg.id
|
|
description = "Ingress internet HTTP"
|
|
direction = "INGRESS"
|
|
protocol = "6"
|
|
source = var.cidr_anywhere
|
|
source_type = "CIDR_BLOCK"
|
|
tcp_options {
|
|
destination_port_range {
|
|
max = 80
|
|
min = 80
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "oci_core_network_security_group_security_rule" "nsg_lbr_security_rule_ingress_02" {
|
|
network_security_group_id = oci_core_network_security_group.load-balancer-public-nsg.id
|
|
description = "Ingress internet HTTPs "
|
|
direction = "INGRESS"
|
|
protocol = "6"
|
|
source = var.cidr_anywhere
|
|
source_type = "CIDR_BLOCK"
|
|
tcp_options {
|
|
destination_port_range {
|
|
max = 443
|
|
min = 443
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "oci_core_network_security_group_security_rule" "nsg_lbr_security_rule_ingress_03" {
|
|
network_security_group_id = oci_core_network_security_group.load-balancer-public-nsg.id
|
|
description = "Ingress internet OnP SOLR."
|
|
direction = "INGRESS"
|
|
protocol = "6"
|
|
source = var.cidr_subnet_app
|
|
source_type = "CIDR_BLOCK"
|
|
tcp_options {
|
|
destination_port_range {
|
|
max = 8983
|
|
min = 8983
|
|
}
|
|
}
|
|
}
|
|
#------------------------------------------------------------------------------------------------------------ |