Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#195): UserData behaviour change between 2 and 3 breaks order of execution #198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 19, 2024

  1. fix(cloudposse#195): UserData behaviour change between 2 and 3 result…

    …s in unexpected behaviour
    
    Nodes that use custom `userdata` but don't use a custom-ami are creating a launch-template with the userdata in place
    but AWS is then injecting their bootstrapper at the end of the userscript.
    This means that `after_cluster_joining_userdata` will execute before cluster registration.
    
    * Split the bootstrap out of the userdata templates into separate files, add ${bootstrap_script} into files in its place
    * `launch_template.tf` Add precondition check; If `after_cluster_joining_userdata` is set but `ami_image_id` isn't and the OS is AL2/WINDOWS, show error
    * `userdata.tf` Add `bootstrap_script` to local.userdata_vars; load in the userdata_bootstrap* file for the OS if the OS is AL2/Windows, otherwise, use empty string.
    * `variables.tf` Add further detail to `after_cluster_joining_userdata`
    ChrisMcKee committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    47fd319 View commit details
    Browse the repository at this point in the history