Skip to content

Commit 54a5f1e

Browse files
authored
fix: bug with data source in managed groups submodule (#1633)
1 parent f198efd commit 54a5f1e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

modules/node_groups/launch_template.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ data "cloudinit_config" "workers_userdata" {
1414
ami_id = lookup(each.value, "ami_id", "")
1515
ami_is_eks_optimized = each.value["ami_is_eks_optimized"]
1616
cluster_name = var.cluster_name
17-
cluster_endpoint = data.aws_eks_cluster.default.endpoint
18-
cluster_ca = data.aws_eks_cluster.default.certificate_authority[0].data
17+
cluster_endpoint = data.aws_eks_cluster.default[0].endpoint
18+
cluster_ca = data.aws_eks_cluster.default[0].certificate_authority[0].data
1919
capacity_type = lookup(each.value, "capacity_type", "ON_DEMAND")
2020
append_labels = length(lookup(each.value, "k8s_labels", {})) > 0 ? ",${join(",", [for k, v in lookup(each.value, "k8s_labels", {}) : "${k}=${v}"])}" : ""
2121
}

modules/node_groups/locals.tf

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
data "aws_eks_cluster" "default" {
2+
count = var.create_eks ? 1 : 0
3+
24
name = var.cluster_name
35
}
46

0 commit comments

Comments
 (0)