terraform-aws-modules / terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws
Apache License 2.0
754 stars 1.87k forks source link

Adding lifecycle #256

Closed adam-6over6 closed 2 years ago

adam-6over6 commented 2 years ago

Description

Added a lifecycle argument for user_data and user_data_base64

Motivation and Context

Adding a lifecycle for user_data and user_data_base64 should help while you don't want that changing the user_data will destroy your EC2 instance. Therefore the Lifecycle argument is being used dynamically, that if you do want it to destroy your EC2 instance, you will be able to get it.

Breaking Changes

No break

How Has This Been Tested?

Tested it locally and worked.

antonbabenko commented 2 years ago

"Tested it locally and worked.". Are you sure that you were using Terraform? :)

antonbabenko commented 2 years ago

It is not possible to use variables in lifecycle in Terraform.

github-actions[bot] commented 1 year ago

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.