65 lines
2.0 KiB
HCL
Executable File
65 lines
2.0 KiB
HCL
Executable File
resource "oci_core_network_security_group" "fss-servers-nsg" {
|
|
compartment_id = var.ocid_compartment_networking
|
|
display_name = "fss-nsg"
|
|
vcn_id = var.ocid_vcn_3_tier
|
|
}
|
|
#--------------------------------------------------------------------------------------------------------------------------------------------
|
|
resource "oci_core_network_security_group_security_rule" "fss_servers_security_ingress_rule_01" {
|
|
network_security_group_id = oci_core_network_security_group.fss-servers-nsg.id
|
|
description = "Ingress fss from app-vcn."
|
|
source = var.cidr_subnet_app
|
|
source_type = "CIDR_BLOCK"
|
|
direction = "INGRESS"
|
|
protocol = "6"
|
|
tcp_options {
|
|
destination_port_range {
|
|
max = 111
|
|
min = 111
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "oci_core_network_security_group_security_rule" "fss_servers_security_ingress_rule_02" {
|
|
network_security_group_id = oci_core_network_security_group.fss-servers-nsg.id
|
|
description = "Ingress fss from app-vcn."
|
|
source = var.cidr_subnet_app
|
|
source_type = "CIDR_BLOCK"
|
|
direction = "INGRESS"
|
|
protocol = "6"
|
|
tcp_options {
|
|
destination_port_range {
|
|
max = 2050
|
|
min = 2048
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "oci_core_network_security_group_security_rule" "fss_servers_security_ingress_rule_03" {
|
|
network_security_group_id = oci_core_network_security_group.fss-servers-nsg.id
|
|
description = "Ingress fss from app-vcn."
|
|
source = var.cidr_subnet_app
|
|
source_type = "CIDR_BLOCK"
|
|
direction = "INGRESS"
|
|
protocol = "17"
|
|
udp_options {
|
|
destination_port_range {
|
|
max = 111
|
|
min = 111
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "oci_core_network_security_group_security_rule" "fss_servers_security_ingress_rule_04" {
|
|
network_security_group_id = oci_core_network_security_group.fss-servers-nsg.id
|
|
description = "Ingress fss from app-vcn."
|
|
source = var.cidr_subnet_app
|
|
source_type = "CIDR_BLOCK"
|
|
direction = "INGRESS"
|
|
protocol = "17"
|
|
udp_options {
|
|
destination_port_range {
|
|
max = 2050
|
|
min = 2048
|
|
}
|
|
}
|
|
} |