Open shaul75 opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
To minimize disruption to existing configurations, the provider could expose a new attribute (e.g., user_data_raw
) that, when specified by the user, is automatically encoded with base64 into user_data
.
Description
Dear Terraform AWS provider maintainers,
I would like to suggest an enhancement to the aws_launch_template resource.
Currently, the user_data field for the aws_launch_template resource must be base64-encoded, which aligns with the AWS API but creates challenges in terms of human readability and understanding the real changes when looking at terraform plan output. This is in contrast to the aws_instance resource that allows providing unencoded user data.
Consider the following scenario:
In this scenario, a developer changes the environment variable:
Then runs terraform plan:
The plan shows that the base64-encoded user_data will change, but it's impossible for the developer to discern what specifically has changed in the user data script without decoding the base64 data.
By contrast, with the aws_instance resource:
When the developer changes the variable and runs terraform plan, they see the meaningful diff:
I propose adding a similar user_data field to the aws_launch_template resource, or alternatively, introducing an optional boolean flag that instructs Terraform to base64-encode the provided user_data.
Affected Resource(s) and/or Data Source(s)
Potential Terraform Configuration
No response
References
No response
Would you like to implement a fix?
None