|
2 | 2 | enabled = coalesce(var.enabled, module.this.enabled, true) |
3 | 3 | name = coalesce(var.name, module.this.name, "teleport-cluster-${random_string.teleport_cluster_random_suffix.result}") |
4 | 4 |
|
5 | | - aws_account_id = var.aws_account_id != "" ? var.aws_account_id : try(data.aws_caller_identity.current[0].account_id, "") |
6 | | - aws_region_name = var.aws_region_name != "" ? var.aws_region_name : try(data.aws_region.current[0].name, "") |
| 5 | + aws_account_id = var.aws_account_id != "" ? var.aws_account_id : one(data.aws_caller_identity.current.*.account_id) |
| 6 | + aws_region_name = var.aws_region_name != "" ? var.aws_region_name : one(data.aws_region.current.*.region) |
7 | 7 | aws_kv_namespace = trim(coalesce(var.aws_kv_namespace, "teleport-cluster/${module.teleport_cluster_label.id}"), "/") |
8 | 8 |
|
9 | 9 | teleport_cluster_name = join("-", [module.teleport_cluster_label.name, module.teleport_cluster_label.stage, module.teleport_cluster_label.environment]) |
@@ -55,9 +55,9 @@ resource "random_string" "teleport_cluster_random_suffix" { |
55 | 55 | module "auth_servers" { |
56 | 56 | source = "./modules/teleport-node" |
57 | 57 |
|
58 | | - instance_sizes = local.instance_config.auth.sizes |
59 | | - instance_count = local.instance_config.auth.count |
60 | | - instance_spot_enabled = local.instance_config.auth.spot |
| 58 | + instance_sizes = local.instance_config.auth.sizes |
| 59 | + instance_count = local.instance_config.auth.count |
| 60 | + instance_spot = local.instance_config.auth.spot |
61 | 61 |
|
62 | 62 | teleport_cluster_name = local.teleport_cluster_name |
63 | 63 | teleport_image_id = local.teleport_image_id |
@@ -91,9 +91,9 @@ module "auth_servers" { |
91 | 91 | module "proxy_servers" { |
92 | 92 | source = "./modules/teleport-node" |
93 | 93 |
|
94 | | - instance_sizes = local.instance_config.proxy.sizes |
95 | | - instance_count = local.instance_config.proxy.count |
96 | | - instance_spot_enabled = local.instance_config.proxy.spot |
| 94 | + instance_sizes = local.instance_config.proxy.sizes |
| 95 | + instance_count = local.instance_config.proxy.count |
| 96 | + instance_spot = local.instance_config.proxy.spot |
97 | 97 |
|
98 | 98 | teleport_cluster_name = local.teleport_cluster_name |
99 | 99 | teleport_image_id = local.teleport_image_id |
@@ -128,9 +128,9 @@ module "proxy_servers" { |
128 | 128 | module "node_servers" { |
129 | 129 | source = "./modules/teleport-node" |
130 | 130 |
|
131 | | - instance_sizes = local.instance_config.node.sizes |
132 | | - instance_count = local.instance_config.node.count |
133 | | - instance_spot_enabled = local.instance_config.node.spot |
| 131 | + instance_sizes = local.instance_config.node.sizes |
| 132 | + instance_count = local.instance_config.node.count |
| 133 | + instance_spot = local.instance_config.node.spot |
134 | 134 |
|
135 | 135 | teleport_cluster_name = local.teleport_cluster_name |
136 | 136 | teleport_image_id = local.teleport_image_id |
|
0 commit comments