@@ -82,94 +82,94 @@ module "melbourne" {
8282 oci.home = oci.home
8383 }
8484
85- count = lookup (var. clusters , " melbourne" ) == true ? 1 : 0
85+ count = tobool ( lookup (var. clusters , " melbourne" )) ? 1 : 0
8686
8787}
8888
89- module "sydney" {
90- source = " oracle-terraform-modules/oke/oci"
91- version = " 4.5.9"
92-
93- home_region = var. home_region
94- region = local. regions [" sydney" ]
95-
96- tenancy_id = var. tenancy_id
97-
98- # general oci parameters
99- compartment_id = var. compartment_id
100- label_prefix = var. label_prefix
101-
102- # ssh keys
103- ssh_private_key_path = " ~/.ssh/id_rsa"
104- ssh_public_key_path = " ~/.ssh/id_rsa.pub"
105-
106- # networking
107- create_drg = true
108- drg_display_name = " sydney"
109-
110- remote_peering_connections = var. connectivity_mode == " mesh" ? { for k , v in merge ({ " admin" = true }, var. clusters ) : " rpc-to-${ k } " => {} if tobool (v) && k != " sydney" } : { " rpc-to-admin" : {} }
111-
112- nat_gateway_route_rules = concat ([
113- {
114- destination = lookup (var. admin_region , " vcn_cidr" )
115- destination_type = " CIDR_BLOCK"
116- network_entity_id = " drg"
117- description = " To Admin"
118- }], var. connectivity_mode == " mesh" ?
119- [for c in keys (var. clusters ) :
120- {
121- destination = lookup (lookup (var. cidrs , c), " vcn" )
122- destination_type = " CIDR_BLOCK"
123- network_entity_id = " drg"
124- description = " Routing to allow connectivity to ${ title (c)} cluster"
125- } if tobool (lookup (var. clusters , c) && c != " sydney" )] : []
126- )
127-
128- vcn_cidrs = [lookup (lookup (var. cidrs , lower (" sydney" )), " vcn" )]
129- vcn_dns_label = " sydney"
130- vcn_name = " sydney"
131-
132- # bastion host
133- create_bastion_host = false
134- upgrade_bastion = false
135-
136- # operator host
137- create_operator = false
138- upgrade_operator = false
139- enable_operator_instance_principal = false
140-
141-
142- # oke cluster options
143- allow_worker_ssh_access = false
144- cluster_name = " sydney"
145- control_plane_type = var. oke_control_plane
146- control_plane_allowed_cidrs = [" 0.0.0.0/0" ]
147- kubernetes_version = var. kubernetes_version
148- pods_cidr = lookup (lookup (var. cidrs , lower (" sydney" )), " pods" )
149- services_cidr = lookup (lookup (var. cidrs , lower (" sydney" )), " services" )
150-
151-
152- # node pools
153- kubeproxy_mode = " ipvs"
154- node_pools = local. managed_nodepools
155- cloudinit_nodepool_common = var. cloudinit_nodepool_common
156-
157- node_pool_image_type = " oke"
158-
159- # oke load balancers
160- load_balancers = " both"
161- preferred_load_balancer = " public"
162- internal_lb_allowed_cidrs = [lookup (var. admin_region , " vcn_cidr" )]
163- internal_lb_allowed_ports = var. connectivity_mode == " mesh" ? [80 , 443 , 15012 , 15017 , 15021 , 15443 ] : [80 , 443 ]
164- public_lb_allowed_cidrs = [" 0.0.0.0/0" ]
165- public_lb_allowed_ports = [80 , 443 ]
166-
167- providers = {
168- oci = oci.sydney
169- oci.home = oci.home
170- }
171-
172- count = lookup (var. clusters , " sydney" ) == true ? 1 : 0
173-
174- }
89+ # module "sydney" {
90+ # source = "oracle-terraform-modules/oke/oci"
91+ # version = "4.5.9"
92+
93+ # home_region = var.home_region
94+ # region = local.regions["sydney"]
95+
96+ # tenancy_id = var.tenancy_id
97+
98+ # # general oci parameters
99+ # compartment_id = var.compartment_id
100+ # label_prefix = var.label_prefix
101+
102+ # # ssh keys
103+ # ssh_private_key_path = "~/.ssh/id_rsa"
104+ # ssh_public_key_path = "~/.ssh/id_rsa.pub"
105+
106+ # # networking
107+ # create_drg = true
108+ # drg_display_name = "sydney"
109+
110+ # remote_peering_connections = var.connectivity_mode == "mesh" ? { for k, v in merge({ "admin" = true }, var.clusters) : "rpc-to-${k}" => {} if tobool(v) && k != "sydney" } : { "rpc-to-admin" : {} }
111+
112+ # nat_gateway_route_rules = concat([
113+ # {
114+ # destination = lookup(var.admin_region, "vcn_cidr")
115+ # destination_type = "CIDR_BLOCK"
116+ # network_entity_id = "drg"
117+ # description = "To Admin"
118+ # }], var.connectivity_mode == "mesh" ?
119+ # [for c in keys(var.clusters) :
120+ # {
121+ # destination = lookup(lookup(var.cidrs, c), "vcn")
122+ # destination_type = "CIDR_BLOCK"
123+ # network_entity_id = "drg"
124+ # description = "Routing to allow connectivity to ${title(c)} cluster"
125+ # } if tobool(lookup(var.clusters, c) && c != "sydney")] : []
126+ # )
127+
128+ # vcn_cidrs = [lookup(lookup(var.cidrs, lower("sydney")), "vcn")]
129+ # vcn_dns_label = "sydney"
130+ # vcn_name = "sydney"
131+
132+ # # bastion host
133+ # create_bastion_host = false
134+ # upgrade_bastion = false
135+
136+ # # operator host
137+ # create_operator = false
138+ # upgrade_operator = false
139+ # enable_operator_instance_principal = false
140+
141+
142+ # # oke cluster options
143+ # allow_worker_ssh_access = false
144+ # cluster_name = "sydney"
145+ # control_plane_type = var.oke_control_plane
146+ # control_plane_allowed_cidrs = ["0.0.0.0/0"]
147+ # kubernetes_version = var.kubernetes_version
148+ # pods_cidr = lookup(lookup(var.cidrs, lower("sydney")), "pods")
149+ # services_cidr = lookup(lookup(var.cidrs, lower("sydney")), "services")
150+
151+
152+ # # node pools
153+ # kubeproxy_mode = "ipvs"
154+ # node_pools = local.managed_nodepools
155+ # cloudinit_nodepool_common = var.cloudinit_nodepool_common
156+
157+ # node_pool_image_type = "oke"
158+
159+ # # oke load balancers
160+ # load_balancers = "both"
161+ # preferred_load_balancer = "public"
162+ # internal_lb_allowed_cidrs = [lookup(var.admin_region, "vcn_cidr")]
163+ # internal_lb_allowed_ports = var.connectivity_mode == "mesh" ? [80, 443, 15012, 15017, 15021, 15443] : [80, 443]
164+ # public_lb_allowed_cidrs = ["0.0.0.0/0"]
165+ # public_lb_allowed_ports = [80, 443]
166+
167+ # providers = {
168+ # oci = oci.sydney
169+ # oci.home = oci.home
170+ # }
171+
172+ # count = tobool( lookup(var.clusters, "sydney")) ? 1 : 0
173+
174+ # }
175175
0 commit comments