terraform-aws-modules / terraform-aws-autoscaling

Terraform module to create AWS Auto Scaling resources πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/autoscaling/aws
Apache License 2.0
292 stars 556 forks source link

User data is ignored when creating launch template #163

Closed jwlogemann closed 2 years ago

jwlogemann commented 2 years ago

Description

User data is ignored when creating launch template

Versions

Reproduction

1) assign user data to use to user_data variable 2) observe that launch template with empty user data is created in AWS

Expected behavior

I expected a launch template with my user_data

Actual behavior

launch template with empty user data is created in AWS

antonbabenko commented 2 years ago

You can see how it is supposed to be used here:

https://github.com/terraform-aws-modules/terraform-aws-autoscaling/blob/d4b7da041ef781604726953234b5bcd494cc5908/examples/complete/main.tf#L406

It should be specified in user_data_base64 argument.

jwlogemann commented 2 years ago

ok, but why does the module support a "user_data" parameter,if it only actually uses the "user_data_base64" parameter?

A bit confusing to say the least.

antonbabenko commented 2 years ago

user_data is being used to create a launch configuration.

You should always look into examples. They are 100% valid.

bryantbiggs commented 2 years ago

https://github.com/terraform-aws-modules/terraform-aws-autoscaling/pull/161 🀷🏽

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.