|
2 | 2 | # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl |
3 | 3 |
|
4 | 4 | locals { |
5 | | - worker_image_id = (length(var.worker_pool_image_id) > 0 ? var.worker_pool_image_id |
6 | | - : var.node_pool_image_id != "none" ? var.node_pool_image_id : "") |
7 | | - worker_image_type = (length(var.worker_pool_image_type) > 0 ? var.worker_pool_image_type |
8 | | - : var.node_pool_image_type != "none" ? var.node_pool_image_type : "") |
9 | | - |
10 | 5 | bastion_public_ip = var.create_bastion_host == true ? module.bastion[0].bastion_public_ip : var.bastion_public_ip != "" ? var.bastion_public_ip : "" |
11 | 6 | operator_private_ip = var.create_operator == true ? module.operator[0].operator_private_ip : var.operator_private_ip != "" ? var.operator_private_ip : "" |
12 | | - operator_instance_principal_group_name = var.create_operator == true ? module.operator[0].operator_instance_principal_group_name : "" |
13 | | - |
14 | | - vcn_id = var.create_vcn == true ? module.vcn[0].vcn_id : coalesce(var.vcn_id, try(data.oci_core_vcns.vcns[0].virtual_networks[0].id, "")) |
15 | | - ig_route_id = var.create_vcn == true ? module.vcn[0].ig_route_id : coalesce(var.ig_route_table_id, try(data.oci_core_route_tables.ig[0].route_tables[0].id, "")) |
16 | | - nat_route_id = var.create_vcn == true ? module.vcn[0].nat_route_id : coalesce(var.nat_route_table_id, try(data.oci_core_route_tables.nat[0].route_tables[0].id, "")) |
| 7 | + operator_instance_principal_group_name = var.create_operator && var.enable_operator_instance_principal ? module.operator[0].operator_instance_principal_group_name : "" |
17 | 8 |
|
| 9 | + ig_route_id = var.create_vcn == true ? module.vcn[0].ig_route_id : coalesce(var.ig_route_table_id, try(data.oci_core_route_tables.ig[0].route_tables[0].id, "")) |
| 10 | + nat_route_id = var.create_vcn == true ? module.vcn[0].nat_route_id : coalesce(var.nat_route_table_id, try(data.oci_core_route_tables.nat[0].route_tables[0].id, "")) |
| 11 | + vcn_id = var.create_vcn == true ? module.vcn[0].vcn_id : coalesce(var.vcn_id, try(data.oci_core_vcns.vcns[0].virtual_networks[0].id, "")) |
18 | 12 | validate_drg_input = var.create_drg && (var.drg_id != null) ? tobool("[ERROR]: create_drg variable can not be true if drg_id is provided.]") : true |
19 | 13 |
|
20 | | - worker_pool_subnet_id = coalesce( |
21 | | - var.worker_pool_subnet_id, |
22 | | - lookup(module.network.subnet_ids, "workers", "")) |
| 14 | + worker_pool_subnet_id = coalesce(var.worker_pool_subnet_id, lookup(module.network.subnet_ids, "workers", "")) |
| 15 | + worker_image_id = length(var.worker_pool_image_id) > 0 ? var.worker_pool_image_id : var.node_pool_image_id != "none" ? var.node_pool_image_id : "" |
| 16 | + worker_image_type = length(var.worker_pool_image_type) > 0 ? var.worker_pool_image_type : var.node_pool_image_type != "none" ? var.node_pool_image_type : "" |
23 | 17 | } |
0 commit comments