@@ -4,18 +4,20 @@ locals {
4
4
workers_subnet_cidr = " 10.22.144.0/20"
5
5
cp_subnet_cidr = " 10.22.0.8/29"
6
6
vcn_cidr = " 10.22.0.0/16"
7
+ my_count = 1
7
8
}
8
9
9
10
resource "oci_core_vcn" "oke_vcn" {
10
11
compartment_id = var. compartment_ocid
11
12
cidr_blocks = [local . vcn_cidr ]
12
13
display_name = " oke-${ random_string . deploy_id . result } -vcn"
13
14
dns_label = " oke"
15
+ count = local. my_count
14
16
}
15
17
16
18
resource "oci_core_security_list" "pub_lb_sl" {
17
19
compartment_id = var. compartment_ocid
18
- vcn_id = oci_core_vcn. oke_vcn . id
20
+ vcn_id = oci_core_vcn. oke_vcn . 0 . id
19
21
ingress_security_rules {
20
22
protocol = " 6"
21
23
source = " 0.0.0.0/0"
@@ -41,7 +43,7 @@ resource "oci_core_security_list" "pub_lb_sl" {
41
43
resource "oci_core_subnet" "pub_lb_subnet" {
42
44
cidr_block = local. lb_subnet_cidr
43
45
compartment_id = var. compartment_ocid
44
- vcn_id = oci_core_vcn. oke_vcn . id
46
+ vcn_id = oci_core_vcn. oke_vcn . 0 . id
45
47
prohibit_public_ip_on_vnic = false
46
48
dns_label = " plb"
47
49
display_name = " pub_lb"
@@ -94,7 +96,7 @@ module "oke" {
94
96
pods = { create = " never" }
95
97
}
96
98
create_vcn = false
97
- vcn_id = oci_core_vcn. oke_vcn . id
99
+ vcn_id = oci_core_vcn. oke_vcn . 0 . id
98
100
# Network module - security
99
101
allow_node_port_access = true
100
102
allow_worker_internet_access = true
0 commit comments