Carga inicial
This commit is contained in:
37
nsg-database-nsg.tf
Executable file
37
nsg-database-nsg.tf
Executable file
@@ -0,0 +1,37 @@
|
||||
resource "oci_core_network_security_group" "db-server-nsg" {
|
||||
compartment_id = var.ocid_compartment_networking
|
||||
display_name = "db-servers-nsg"
|
||||
vcn_id = var.ocid_vcn_3_tier
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_db_security_ingress_rule_01" {
|
||||
network_security_group_id = oci_core_network_security_group.db-server-nsg.id
|
||||
description = "Ingress from sn-app."
|
||||
source = var.cidr_subnet_app
|
||||
source_type = "CIDR_BLOCK"
|
||||
direction = "INGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 3306
|
||||
min = 3306
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_db_security_ingress_rule_02" {
|
||||
network_security_group_id = oci_core_network_security_group.db-server-nsg.id
|
||||
description = "Ingress from sn-app-pri."
|
||||
source = var.cidr_subnet_app
|
||||
source_type = "CIDR_BLOCK"
|
||||
direction = "INGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 33060
|
||||
min = 33060
|
||||
}
|
||||
}
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user