51 lines
1.7 KiB
HCL
Executable File
51 lines
1.7 KiB
HCL
Executable File
resource "oci_core_network_security_group" "solr-server-nsg" {
|
|
compartment_id = var.ocid_compartment_networking
|
|
display_name = "solr-servers-nsg"
|
|
vcn_id = var.ocid_vcn_3_tier
|
|
}
|
|
#--------------------------------------------------------------------------------------------------------------------------------------------
|
|
resource "oci_core_network_security_group_security_rule" "nsg_solr-server_ingress_rule_01" {
|
|
network_security_group_id = oci_core_network_security_group.solr-server-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_solr-server_ingress_rule_02" {
|
|
network_security_group_id = oci_core_network_security_group.solr-server-nsg.id
|
|
description = "Ingress SOLR from Load Balancer."
|
|
source = var.cidr_subnet_app
|
|
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_solr_servers_security_egress_rule_03" {
|
|
network_security_group_id = oci_core_network_security_group.solr-server-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
|
|
}
|
|
}
|
|
}
|
|
#-------------------------------------------------------------------------------------------------------------------------------------------- |