provider/aws: Fixes #5108 (launch_configuration failures) #6512
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.
Fixes #5108 -
Invalid address to set: []string{"root_block_device", "0", "encrypted"}
Fixes the problem where the root_block_device could cause an
apply
error by reading back an "encrypted" parameter that was meant for an ebs_block_device. "encrypted" is not part of the root_block_device schema, since it can't be set explicitly.Added a check in Create to fail when the root device is incorrectly specified as an ebs_block_device, as this causes continual refreshing due to mismatched state between root_block_device and ebs_block_device.
I wish I could make this trigger during
plan
, but it doesn't, only onapply
. I think that's an improvement over refresh-looping."encrypted" and "snapshot_id" should be guarded by
ConflictsWith
, but that doesn't appear to work on nested resources despite #1926. I tried it and then reverted that when I saw no effect.I think this PR as-is is an improvement over the current state of surprise failures. Any advice about the two issues above would be greatly appreciated, though. They're not blocking bugs, but would help prevent further surprises and questions.