fix major issues

This commit is contained in:
Guilherme Silva
2026-07-13 20:09:03 -03:00
parent 96cd0904d6
commit ee0afe7e79
16 changed files with 398 additions and 110 deletions

View File

@@ -51,6 +51,51 @@ resource "oci_core_network_security_group_security_rule" "nsg_sip-server_ingress
#--------------------------------------------------------------------------------------------------------------------------------------------
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 to Internet port TCP/80"
destination = var.cidr_anywhere
destination_type = "CIDR_BLOCK"
direction = "EGRESS"
protocol = "6"
tcp_options {
destination_port_range {
max = 80
min = 80
}
}
}
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 to OSN"
destination = lookup(data.oci_core_services.all_services.services[1], "cidr_block")
destination_type = "SERVICE_CIDR_BLOCK"
direction = "EGRESS"
protocol = "6"
tcp_options {
destination_port_range {
max = 443
min = 443
}
}
}
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 to Internet port TCP/443"
destination = var.cidr_anywhere
destination_type = "CIDR_BLOCK"
direction = "EGRESS"
protocol = "6"
tcp_options {
destination_port_range {
max = 443
min = 443
}
}
}
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 MySQL to sn-database"
destination = var.cidr_subnet_database
@@ -65,22 +110,7 @@ resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_
}
}
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" {
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_rule_05" {
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
description = "Egress SOLR to sn-database"
destination = var.cidr_subnet_app
@@ -95,7 +125,7 @@ resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_
}
}
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_rule_04" {
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_rule_06" {
network_security_group_id = oci_core_network_security_group.sip-servers-nsg.id
description = "Egress Memcached to sn-app"
destination = var.cidr_subnet_app
@@ -109,4 +139,21 @@ resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_
}
}
}
resource "oci_core_network_security_group_security_rule" "nsg_sip-server_egress_rule_07" {
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
}
}
}
#--------------------------------------------------------------------------------------------------------------------------------------------