-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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: Fix root-block-device bug #11619
Conversation
Previously the `root_block_device` config map was a `schema.TypeSet` with an empty `Set` function, and a hard-limit of 1 on the attribute block. This prevented a user from making any real changes inside the attribute block, thus leaving the user with a `Apply complete!` message, and nothing changed. The schema API has since been updated, and we can now specify the `root_block_device` as a `schema.TypeList` with `MaxItems` set to `1`. This fixes the issue, and allows the user to update the `aws_instance`'s `root_block_device` attribute, and see changes actually propagate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This is safe to back port to 0-8-stable too as far as I can tell.
Discovered after #11619 was fixed, and while fixing acceptance tests for the `aws_spot_instance_request` resource. Previously the `aws_spot_instance_request` resource wouldn't populate any of the block device attributes from the resulting instance's metadata. This fixes that issue, and also fixes the `aws_spot_instance_request` acceptance tests to be more equipped for running in parallel. ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSpotInstanceRequest_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/02/02 18:02:37 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSpotInstanceRequest_ -timeout 120m === RUN TestAccAWSSpotInstanceRequest_basic --- PASS: TestAccAWSSpotInstanceRequest_basic (111.96s) === RUN TestAccAWSSpotInstanceRequest_withBlockDuration --- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (105.12s) === RUN TestAccAWSSpotInstanceRequest_vpc --- PASS: TestAccAWSSpotInstanceRequest_vpc (115.81s) === RUN TestAccAWSSpotInstanceRequest_SubnetAndSG --- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSG (130.46s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 463.377s ```
Discovered after #11619 was fixed, and while fixing acceptance tests for the `aws_spot_instance_request` resource. Previously the `aws_spot_instance_request` resource wouldn't populate any of the block device attributes from the resulting instance's metadata. This fixes that issue, and also fixes the `aws_spot_instance_request` acceptance tests to be more equipped for running in parallel. ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSpotInstanceRequest_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/02/02 18:02:37 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSpotInstanceRequest_ -timeout 120m === RUN TestAccAWSSpotInstanceRequest_basic --- PASS: TestAccAWSSpotInstanceRequest_basic (111.96s) === RUN TestAccAWSSpotInstanceRequest_withBlockDuration --- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (105.12s) === RUN TestAccAWSSpotInstanceRequest_vpc --- PASS: TestAccAWSSpotInstanceRequest_vpc (115.81s) === RUN TestAccAWSSpotInstanceRequest_SubnetAndSG --- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSG (130.46s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 463.377s ```
Discovered after hashicorp#11619 was fixed, and while fixing acceptance tests for the `aws_spot_instance_request` resource. Previously the `aws_spot_instance_request` resource wouldn't populate any of the block device attributes from the resulting instance's metadata. This fixes that issue, and also fixes the `aws_spot_instance_request` acceptance tests to be more equipped for running in parallel. ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSpotInstanceRequest_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/02/02 18:02:37 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSpotInstanceRequest_ -timeout 120m === RUN TestAccAWSSpotInstanceRequest_basic --- PASS: TestAccAWSSpotInstanceRequest_basic (111.96s) === RUN TestAccAWSSpotInstanceRequest_withBlockDuration --- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (105.12s) === RUN TestAccAWSSpotInstanceRequest_vpc --- PASS: TestAccAWSSpotInstanceRequest_vpc (115.81s) === RUN TestAccAWSSpotInstanceRequest_SubnetAndSG --- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSG (130.46s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 463.377s ```
I'm still encountering this issue with a launch_configuration on v0.9.5 |
Hi @Dombo! Sorry for the troubles. Given how old this PR is, it'd be best if you're able to open a new issue in the |
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. |
Previously the
root_block_device
config map was aschema.TypeSet
with an emptySet
function, and a hard-limit of 1 on the attribute block.This prevented a user from making any real changes inside the attribute block, thus leaving the user with a
Apply complete!
message, and nothing changed.The schema API has since been updated, and we can now specify the
root_block_device
as aschema.TypeList
withMaxItems
set to1
. This fixes the issue, and allows the user to update theaws_instance
'sroot_block_device
attribute, and see changes actually propagate.Also fixes the remaining formatting errors, and duplicate struct declarations.
Fixes: #3941