Closed IgorMilavec closed 2 years ago
@IgorMilavec this has to be supported first by the AWS API and then by the AWS provider before we can support it here. Ref https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#user_data_replace_on_change
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.
Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.
Is your request related to a problem? Please describe.
When using Windows AMI provided by Amazon, these images are unregistered after 4 months, thereby breaking Terraform configs if we reference specific AMI. If on the other hand we would reference the latest image, that would cause the instances to be replaced.
Describe the solution you'd like.
I propose to add
ami_replace_on_change
property that would work analogous touser_data_replace_on_change
. The default value would betrue
to be backwards compatible. This way we would be able to reference the latest image in our configs.Describe alternatives you've considered.
Copying AMI, but it is not permitted.
Additional context
I can provide a PR if such a solution is accepted.