Carga inicial
This commit is contained in:
112
nsg-sip-servers-nsg.tf
Executable file
112
nsg-sip-servers-nsg.tf
Executable file
@@ -0,0 +1,112 @@
|
||||
resource "oci_core_network_security_group" "sip-servers-nsg" {
|
||||
compartment_id = var.ocid_compartment_networking
|
||||
display_name = "sip-servers-nsg"
|
||||
vcn_id = var.ocid_vcn_3_tier
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_ingress_rule_01" {
|
||||
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
|
||||
description = "Ingress HTTP from Load Balancer."
|
||||
source = var.cidr_subnet_web
|
||||
source_type = "CIDR_BLOCK"
|
||||
direction = "INGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 80
|
||||
min = 80
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_ingress_rule_02" {
|
||||
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
|
||||
description = "Ingress HTTPS from Load Balancer."
|
||||
source = var.cidr_subnet_web
|
||||
source_type = "CIDR_BLOCK"
|
||||
direction = "INGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 443
|
||||
min = 443
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_ingress_rule_03" {
|
||||
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
|
||||
description = "Ingress SOLR from Load Balancer."
|
||||
source = var.cidr_subnet_web
|
||||
source_type = "CIDR_BLOCK"
|
||||
direction = "INGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 8983
|
||||
min = 8983
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_rule_01" {
|
||||
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
|
||||
description = "Egress MySQL to sn-database"
|
||||
destination = var.cidr_subnet_database
|
||||
destination_type = "CIDR_BLOCK"
|
||||
direction = "EGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 3306
|
||||
min = 3306
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_rule_02" {
|
||||
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
|
||||
description = "Egress MySQL Heatware to sn-database"
|
||||
destination = var.cidr_subnet_database
|
||||
destination_type = "CIDR_BLOCK"
|
||||
direction = "EGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 33060
|
||||
min = 33060
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_rule_03" {
|
||||
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
|
||||
description = "Egress SOLR to sn-database"
|
||||
destination = var.cidr_subnet_app
|
||||
destination_type = "CIDR_BLOCK"
|
||||
direction = "EGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 8983
|
||||
min = 8983
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_rule_04" {
|
||||
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
|
||||
description = "Egress Memcached to sn-app"
|
||||
destination = var.cidr_subnet_app
|
||||
destination_type = "CIDR_BLOCK"
|
||||
direction = "EGRESS"
|
||||
protocol = "6"
|
||||
tcp_options {
|
||||
destination_port_range {
|
||||
max = 11211
|
||||
min = 11211
|
||||
}
|
||||
}
|
||||
}
|
||||
#--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user