Skip to content

Commit be9835d

Browse files
authored
Suppress bootstrap when after bootstrap script is supplies (#200)
1 parent 0b88ed0 commit be9835d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

userdata.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ locals {
3535
# - We are running Amazon Linux 2 or Windows (the other OSes do not use bootstrap.sh) and either:
3636
# - We explicitly are given extra args for bootstrap via bootstrap_additional_options or
3737
# - We are given extra args for kubelet via kubelet_additional_options, which are passed to bootstrap.sh
38+
# - We are given a script to run after bootstrap, which means we have to run bootstrap ourselves, because
39+
# otherwise EKS will run boostrap a second time after our bootstrap and "after bootstrap"
3840

3941
suppress_bootstrap = local.enabled && (local.ami_os == "AL2" || local.ami_os == "WINDOWS") ? (
40-
length(var.bootstrap_additional_options) > 0 || length(var.kubelet_additional_options) > 0
42+
length(var.bootstrap_additional_options) > 0 || length(var.kubelet_additional_options) > 0 || length(var.after_cluster_joining_userdata) > 0
4143
) : false
4244

4345
userdata_template_file = {

0 commit comments

Comments
 (0)