Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Fixes #5108 (launch_configuration failures) #6512

Merged
merged 1 commit into from
Jun 8, 2016

Conversation

pforman
Copy link
Contributor

@pforman pforman commented May 6, 2016

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 on apply. 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.

Fixed 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.

"encrypted" and "snapshot_id" should be guarded with ConflictsWith, but
that doesn't appear to work on nested resources despite hashicorp#1926.
@nickm4062
Copy link

Any update on this patch?

@catsby
Copy link
Contributor

catsby commented Jun 8, 2016

Thanks for the fix, @pforman ! I check this out to verify things and it looks good here. Verified the existing tests pass:

TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSLaunchConfiguration_ -timeout 120m
=== RUN   TestAccAWSLaunchConfiguration_importBasic
--- PASS: TestAccAWSLaunchConfiguration_importBasic (9.66s)
=== RUN   TestAccAWSLaunchConfiguration_basic
--- PASS: TestAccAWSLaunchConfiguration_basic (18.86s)
=== RUN   TestAccAWSLaunchConfiguration_withBlockDevices
--- PASS: TestAccAWSLaunchConfiguration_withBlockDevices (11.15s)
=== RUN   TestAccAWSLaunchConfiguration_withSpotPrice
--- PASS: TestAccAWSLaunchConfiguration_withSpotPrice (11.09s)
=== RUN   TestAccAWSLaunchConfiguration_withIAMProfile
--- PASS: TestAccAWSLaunchConfiguration_withIAMProfile (21.11s)
=== RUN   TestAccAWSLaunchConfiguration_withEncryption
--- PASS: TestAccAWSLaunchConfiguration_withEncryption (11.57s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    83.460s
Test:
[github.com/hashicorp/terraform][pr-6512](2)$

@ghost
Copy link

ghost commented Apr 25, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid address to set: []string{"root_block_device", "0", "encrypted"}
4 participants