Skip to content

Commit afd0e10

Browse files
committed
Fix missing LB rule
1 parent 833e460 commit afd0e10

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

deploy/devops/tf-env/oke.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ locals {
44
workers_subnet_cidr = "10.22.144.0/20"
55
cp_subnet_cidr = "10.22.0.8/29"
66
vcn_cidr = "10.22.0.0/16"
7+
my_count = 1
78
}
89

910
resource "oci_core_vcn" "oke_vcn" {
1011
compartment_id = var.compartment_ocid
1112
cidr_blocks = [local.vcn_cidr]
1213
display_name = "oke-${random_string.deploy_id.result}-vcn"
1314
dns_label = "oke"
15+
count = local.my_count
1416
}
1517

1618
resource "oci_core_security_list" "pub_lb_sl" {
1719
compartment_id = var.compartment_ocid
18-
vcn_id = oci_core_vcn.oke_vcn.id
20+
vcn_id = oci_core_vcn.oke_vcn.0.id
1921
ingress_security_rules {
2022
protocol = "6"
2123
source = "0.0.0.0/0"
@@ -41,7 +43,7 @@ resource "oci_core_security_list" "pub_lb_sl" {
4143
resource "oci_core_subnet" "pub_lb_subnet" {
4244
cidr_block = local.lb_subnet_cidr
4345
compartment_id = var.compartment_ocid
44-
vcn_id = oci_core_vcn.oke_vcn.id
46+
vcn_id = oci_core_vcn.oke_vcn.0.id
4547
prohibit_public_ip_on_vnic = false
4648
dns_label = "plb"
4749
display_name = "pub_lb"
@@ -94,7 +96,7 @@ module "oke" {
9496
pods = { create = "never" }
9597
}
9698
create_vcn = false
97-
vcn_id = oci_core_vcn.oke_vcn.id
99+
vcn_id = oci_core_vcn.oke_vcn.0.id
98100
# Network module - security
99101
allow_node_port_access = true
100102
allow_worker_internet_access = true

0 commit comments

Comments
 (0)