AWS: launch config remove the image_id lookup #2498
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So this is a strange use case fix.
Every now and then we update the AMI and don't want to tear down instances/ASG that are build on older AMIs done by terraform
If we spin up an instance using aws_instance we can just edit the json state file and terraform honors that since it doesn't query AWS for the currently running AMI.
Launch config queries AWS for the image_id so terraform wants to tear it down and re-build.
I'm trying to make this standard since on #terraform on IRC I was told to just edit the state json if I had to make a AMI change.
If this is needed then close the PR.