Skip to content

Commit 06939cf

Browse files
authored
[hotfix] Provide cluster data to bootstrap.sh (#187)
1 parent e9f908c commit 06939cf

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ locals {
2222

2323
get_cluster_data = local.enabled ? (
2424
local.need_cluster_kubernetes_version ||
25+
local.suppress_bootstrap ||
2526
local.associate_cluster_security_group ||
2627
local.need_ssh_access_sg
2728
) : false

userdata.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,6 @@ locals {
7474
bootstrap_extra_args = length(var.bootstrap_additional_options) == 0 ? "" : join(" ", var.bootstrap_additional_options)
7575
after_cluster_joining_userdata = length(var.after_cluster_joining_userdata) == 0 ? "" : join("\n", var.after_cluster_joining_userdata)
7676

77-
/* It turns out we never need this, because we only use it when we are suppressing the EKS bootstrap,
78-
* and we only suppress the EKS bootstrap when we are running bootstrap.sh ourselves, which only happens
79-
* when we are running Amazon Linux 2 or Windows. This would only be used by a CUSTOM AMI,
80-
* but for a CUSTOM AMI, the user must provide the full userdata.
81-
*
82-
* Keeping this here for now in case we need it in the future.
83-
8477
cluster_endpoint = local.get_cluster_data ? data.aws_eks_cluster.this[0].endpoint : null
8578
certificate_authority_data = local.get_cluster_data ? data.aws_eks_cluster.this[0].certificate_authority[0].data : null
8679
cluster_name = local.get_cluster_data ? data.aws_eks_cluster.this[0].name : null
@@ -89,7 +82,6 @@ locals {
8982
[for net in data.aws_eks_cluster.this[0].kubernetes_network_config : net.service_ipv4_cidr if net.ip_family == "ipv4"],
9083
[for net in data.aws_eks_cluster.this[0].kubernetes_network_config : net.service_ipv6_cidr if net.ip_family == "ipv6"]
9184
)...) : null
92-
*/
9385
}
9486

9587
# If var.userdata_override_base64[0] is present then we use it rather than generating userdata

0 commit comments

Comments
 (0)