-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Don't set terraform user_data if it is empty #8744
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rifelpet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Ugh integration tests failing because we shouldnt expect a bastion user_data file unless the additionalUserData isnt empty. adding support for that in the integration tests will be a significant change which would conflict with #8737 so i'm inclined to wait for that to get merged which might be a while. |
/hold for #8737 and some rebase work ill do afterwards |
Bastion hosts have no user_data by default. This is not valid in terraform, based on the error messages reported here [0] The Terraform provider code says user_data is optional for both LaunchConfigurations and LaunchTemplates [1] [2] This change prevents the user_data property from being added to aws_launch_configuration and aws_launch_template resources unless the string is not empty. [0] https://travis-ci.org/github/kubernetes/kops/jobs/662472020 [1] https://github.com/terraform-providers/terraform-provider-aws/blob/04d24f80f3b740d0c9d74d97e818b7da15cb96c5/aws/resource_aws_launch_configuration.go#L74-L76 [2] https://github.com/terraform-providers/terraform-provider-aws/blob/04d24f80f3b740d0c9d74d97e818b7da15cb96c5/aws/resource_aws_launch_template.go#L510-L512
eec7b6a
to
54c3b2f
Compare
/lgtm |
/hold cancel |
Bastion hosts have no user_data by default. This is not valid in terraform, evidenced by the error messages reported here.
The Terraform provider code says user_data is optional for both LaunchConfigurations and LaunchTemplates.
This change prevents the user_data property from being added to
aws_launch_configuration
andaws_launch_template
resources if the string is empty.