-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix for ebs_block_devices disappearing in data source, and fix instan… #10045
Conversation
… block contains only Computed attributes Reference: hashicorp/terraform-provider-aws#7198 Reference: hashicorp/terraform-provider-aws#10045 Reference: hashicorp/terraform-provider-aws#10339 Reference: hashicorp/terraform#22719 When a resource schema contains the following: ```go "config_block_attribute": { Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attribute1": { Type: schema.TypeBool, Computed: true, }, "attribute2": { Type: schema.TypeString, Computed: true, }, }, }, }, ``` The TypeSet hash values were previously all collapsed to the zero-value, which meant that multiple set entries were lost. Here we check that all of the attributes are not just `Computed: true`. If they are all `Computed: true` attributes, ignore the check for user-defined attributes to compute the hash value.
aws/data_source_aws_instance_test.go
Outdated
@@ -841,7 +885,7 @@ data "aws_ami" "amzn-ami-minimal-hvm-ebs" { | |||
|
|||
resource "aws_vpc" "test" { | |||
cidr_block = "172.16.0.0/16" | |||
|
|||
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.
Looks like some whitespace got added here and below on 897, 941, 950
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.
Just need to rebase
--- PASS: TestAccAWSInstanceDataSource_creditSpecification (83.47s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData (109.88s)
--- PASS: TestAccAWSInstanceDataSource_GetUserData_NoUserData (108.75s)
--- PASS: TestAccAWSInstanceDataSource_SecurityGroups (126.30s)
--- PASS: TestAccAWSInstanceDataSource_PlacementGroup (73.58s)
--- PASS: TestAccAWSInstanceDataSource_VPC (112.64s)
--- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (84.25s)
--- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (88.44s)
--- PASS: TestAccAWSInstanceDataSource_RootBlockDevice_KmsKeyId (98.38s)
--- PASS: TestAccAWSInstanceDataSource_EbsBlockDevice_KmsKeyId (88.85s)
--- PASS: TestAccAWSInstanceDataSource_basic (127.80s)
--- PASS: TestAccAWSInstanceDataSource_tags (127.90s)
--- PASS: TestAccAWSInstanceDataSource_AzUserData (128.13s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_trueToFalse (161.39s)
--- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (67.84s)
--- PASS: TestAccAWSInstanceDataSource_getPasswordData_falseToTrue (181.95s)
--- PASS: TestAccAWSInstanceDataSource_blockDevices (68.17s)
--- PASS: TestAccAWSInstanceDataSource_privateIP (196.68s)
--- PASS: TestAccAWSInstanceDataSource_keyPair (91.83s)
ec64659
to
869f103
Compare
…ce data source tests
869f103
to
89eca59
Compare
This has been released in version 2.39.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
… block contains only Computed attributes Reference: hashicorp/terraform-provider-aws#7198 Reference: hashicorp/terraform-provider-aws#10045 Reference: hashicorp/terraform-provider-aws#10339 Reference: hashicorp/terraform#22719 When a resource schema contains the following: ```go "config_block_attribute": { Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attribute1": { Type: schema.TypeBool, Computed: true, }, "attribute2": { Type: schema.TypeString, Computed: true, }, }, }, }, ``` The TypeSet hash values were previously all collapsed to the zero-value, which meant that multiple set entries were lost. Here we check that all of the attributes are not just `Computed: true`. If they are all `Computed: true` attributes, ignore the check for user-defined attributes to compute the hash value.
… block contains only Computed attributes Reference: hashicorp/terraform-provider-aws#7198 Reference: hashicorp/terraform-provider-aws#10045 Reference: hashicorp/terraform-provider-aws#10339 Reference: hashicorp/terraform#22719 When a resource schema contains the following: ```go "config_block_attribute": { Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attribute1": { Type: schema.TypeBool, Computed: true, }, "attribute2": { Type: schema.TypeString, Computed: true, }, }, }, }, ``` The TypeSet hash values were previously all collapsed to the zero-value, which meant that multiple set entries were lost. Here we check that all of the attributes are not just `Computed: true`. If they are all `Computed: true` attributes, ignore the check for user-defined attributes to compute the hash value.
… block contains only Computed attributes Reference: hashicorp/terraform-provider-aws#7198 Reference: hashicorp/terraform-provider-aws#10045 Reference: hashicorp/terraform-provider-aws#10339 Reference: hashicorp/terraform#22719 When a resource schema contains the following: ```go "config_block_attribute": { Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attribute1": { Type: schema.TypeBool, Computed: true, }, "attribute2": { Type: schema.TypeString, Computed: true, }, }, }, }, ``` The TypeSet hash values were previously all collapsed to the zero-value, which meant that multiple set entries were lost. Here we check that all of the attributes are not just `Computed: true`. If they are all `Computed: true` attributes, ignore the check for user-defined attributes to compute the hash value.
… block contains only Computed attributes Reference: hashicorp/terraform-provider-aws#7198 Reference: hashicorp/terraform-provider-aws#10045 Reference: hashicorp/terraform-provider-aws#10339 Reference: hashicorp/terraform#22719 When a resource schema contains the following: ```go "config_block_attribute": { Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attribute1": { Type: schema.TypeBool, Computed: true, }, "attribute2": { Type: schema.TypeString, Computed: true, }, }, }, }, ``` The TypeSet hash values were previously all collapsed to the zero-value, which meant that multiple set entries were lost. Here we check that all of the attributes are not just `Computed: true`. If they are all `Computed: true` attributes, ignore the check for user-defined attributes to compute the hash value.
… block contains only Computed attributes Reference: hashicorp/terraform-provider-aws#7198 Reference: hashicorp/terraform-provider-aws#10045 Reference: hashicorp/terraform-provider-aws#10339 Reference: hashicorp/terraform#22719 When a resource schema contains the following: ```go "config_block_attribute": { Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "attribute1": { Type: schema.TypeBool, Computed: true, }, "attribute2": { Type: schema.TypeString, Computed: true, }, }, }, }, ``` The TypeSet hash values were previously all collapsed to the zero-value, which meant that multiple set entries were lost. Here we check that all of the attributes are not just `Computed: true`. If they are all `Computed: true` attributes, ignore the check for user-defined attributes to compute the hash value.
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
…ce data source tests
Note that this is in addition to the upstream fix.
Community Note
Closes #7198
Release note for CHANGELOG:
Output from acceptance testing: