diff --git a/pkg/model/bootstrapscript.go b/pkg/model/bootstrapscript.go index 062aa69128..2f806fee25 100644 --- a/pkg/model/bootstrapscript.go +++ b/pkg/model/bootstrapscript.go @@ -245,7 +245,7 @@ func (b *BootstrapScriptBuilder) ResourceNodeUp(c *fi.ModelBuilderContext, ig *k // Bastions can have AdditionalUserData, but if there isn't any skip this part if len(ig.Spec.AdditionalUserData) == 0 { - return fi.NewStringResource(""), nil + return nil, nil } } diff --git a/tests/integration/update_cluster/private-shared-ip/cloudformation.json b/tests/integration/update_cluster/private-shared-ip/cloudformation.json index ca58131179..aba2d0db80 100644 --- a/tests/integration/update_cluster/private-shared-ip/cloudformation.json +++ b/tests/integration/update_cluster/private-shared-ip/cloudformation.json @@ -366,8 +366,7 @@ } ] } - ], - "UserData": "extracted" + ] } } }, diff --git a/tests/integration/update_cluster/private-shared-ip/cloudformation.json.extracted.yaml b/tests/integration/update_cluster/private-shared-ip/cloudformation.json.extracted.yaml index 236962341b..d2b2f75187 100644 --- a/tests/integration/update_cluster/private-shared-ip/cloudformation.json.extracted.yaml +++ b/tests/integration/update_cluster/private-shared-ip/cloudformation.json.extracted.yaml @@ -1,4 +1,3 @@ -Resources.AWSEC2LaunchTemplatebastionprivatesharedipexamplecom.Properties.LaunchTemplateData.UserData: "" Resources.AWSEC2LaunchTemplatemasterustest1amastersprivatesharedipexamplecom.Properties.LaunchTemplateData.UserData: | #!/bin/bash set -o errexit diff --git a/tests/integration/update_cluster/privatecilium/cloudformation.json b/tests/integration/update_cluster/privatecilium/cloudformation.json index 0599d13338..57ac2868c9 100644 --- a/tests/integration/update_cluster/privatecilium/cloudformation.json +++ b/tests/integration/update_cluster/privatecilium/cloudformation.json @@ -428,8 +428,7 @@ } ] } - ], - "UserData": "extracted" + ] } } }, diff --git a/tests/integration/update_cluster/privatecilium/cloudformation.json.extracted.yaml b/tests/integration/update_cluster/privatecilium/cloudformation.json.extracted.yaml index 4bb14b798d..14ad34f6ff 100644 --- a/tests/integration/update_cluster/privatecilium/cloudformation.json.extracted.yaml +++ b/tests/integration/update_cluster/privatecilium/cloudformation.json.extracted.yaml @@ -1,4 +1,3 @@ -Resources.AWSEC2LaunchTemplatebastionprivateciliumexamplecom.Properties.LaunchTemplateData.UserData: "" Resources.AWSEC2LaunchTemplatemasterustest1amastersprivateciliumexamplecom.Properties.LaunchTemplateData.UserData: | #!/bin/bash set -o errexit diff --git a/tests/integration/update_cluster/privatecilium2/cloudformation.json b/tests/integration/update_cluster/privatecilium2/cloudformation.json index 031dfa53c1..9732100a5c 100644 --- a/tests/integration/update_cluster/privatecilium2/cloudformation.json +++ b/tests/integration/update_cluster/privatecilium2/cloudformation.json @@ -400,8 +400,7 @@ } ] } - ], - "UserData": "extracted" + ] } } }, diff --git a/tests/integration/update_cluster/privatecilium2/cloudformation.json.extracted.yaml b/tests/integration/update_cluster/privatecilium2/cloudformation.json.extracted.yaml index 9fecd14e98..23451fa8c9 100644 --- a/tests/integration/update_cluster/privatecilium2/cloudformation.json.extracted.yaml +++ b/tests/integration/update_cluster/privatecilium2/cloudformation.json.extracted.yaml @@ -1,4 +1,3 @@ -Resources.AWSEC2LaunchTemplatebastionprivateciliumexamplecom.Properties.LaunchTemplateData.UserData: "" Resources.AWSEC2LaunchTemplatemasterustest1amastersprivateciliumexamplecom.Properties.LaunchTemplateData.UserData: | #!/bin/bash set -o errexit diff --git a/tests/integration/update_cluster/privateciliumadvanced/cloudformation.json b/tests/integration/update_cluster/privateciliumadvanced/cloudformation.json index 1da8e21d96..563e8cb58b 100644 --- a/tests/integration/update_cluster/privateciliumadvanced/cloudformation.json +++ b/tests/integration/update_cluster/privateciliumadvanced/cloudformation.json @@ -428,8 +428,7 @@ } ] } - ], - "UserData": "extracted" + ] } } }, diff --git a/tests/integration/update_cluster/privateciliumadvanced/cloudformation.json.extracted.yaml b/tests/integration/update_cluster/privateciliumadvanced/cloudformation.json.extracted.yaml index 5d35965ec4..1a3bac3165 100644 --- a/tests/integration/update_cluster/privateciliumadvanced/cloudformation.json.extracted.yaml +++ b/tests/integration/update_cluster/privateciliumadvanced/cloudformation.json.extracted.yaml @@ -1,4 +1,3 @@ -Resources.AWSEC2LaunchTemplatebastionprivateciliumadvancedexamplecom.Properties.LaunchTemplateData.UserData: "" Resources.AWSEC2LaunchTemplatemasterustest1amastersprivateciliumadvancedexamplecom.Properties.LaunchTemplateData.UserData: | #!/bin/bash set -o errexit