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

ec2/instance: Fix data source regression #36054

Merged
merged 6 commits into from
Mar 1, 2024
Merged

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Mar 1, 2024

Description

Relations

Closes #36038
Closes #36056
Closes #36037

References

Output from Acceptance Testing

Prior to fix

% make t T=TestAccEC2InstanceDataSource_ K=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2InstanceDataSource_'  -timeout 360m
...
panic: Invalid address to set: []string{"root_block_device", "0", "tags_all"}

goroutine 20936 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc03f1b9100, {0x1e0b6b64, 0x11}, {0x204d1780, 0xc004da1db8})

After fix

% make t T=TestAccEC2InstanceDataSource_ K=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2InstanceDataSource_'  -timeout 360m
=== RUN   TestAccEC2InstanceDataSource_basic
=== PAUSE TestAccEC2InstanceDataSource_basic
=== RUN   TestAccEC2InstanceDataSource_tags
=== PAUSE TestAccEC2InstanceDataSource_tags
=== RUN   TestAccEC2InstanceDataSource_azUserData
=== PAUSE TestAccEC2InstanceDataSource_azUserData
=== RUN   TestAccEC2InstanceDataSource_gp2IopsDevice
=== PAUSE TestAccEC2InstanceDataSource_gp2IopsDevice
=== RUN   TestAccEC2InstanceDataSource_gp3ThroughputDevice
=== PAUSE TestAccEC2InstanceDataSource_gp3ThroughputDevice
=== RUN   TestAccEC2InstanceDataSource_blockDevices
=== PAUSE TestAccEC2InstanceDataSource_blockDevices
=== RUN   TestAccEC2InstanceDataSource_EBSBlockDevice_kmsKeyID
=== PAUSE TestAccEC2InstanceDataSource_EBSBlockDevice_kmsKeyID
=== RUN   TestAccEC2InstanceDataSource_RootBlockDevice_kmsKeyID
=== PAUSE TestAccEC2InstanceDataSource_RootBlockDevice_kmsKeyID
=== RUN   TestAccEC2InstanceDataSource_rootInstanceStore
=== PAUSE TestAccEC2InstanceDataSource_rootInstanceStore
=== RUN   TestAccEC2InstanceDataSource_privateIP
=== PAUSE TestAccEC2InstanceDataSource_privateIP
=== RUN   TestAccEC2InstanceDataSource_secondaryPrivateIPs
=== PAUSE TestAccEC2InstanceDataSource_secondaryPrivateIPs
=== RUN   TestAccEC2InstanceDataSource_ipv6Addresses
=== PAUSE TestAccEC2InstanceDataSource_ipv6Addresses
=== RUN   TestAccEC2InstanceDataSource_keyPair
=== PAUSE TestAccEC2InstanceDataSource_keyPair
=== RUN   TestAccEC2InstanceDataSource_vpc
=== PAUSE TestAccEC2InstanceDataSource_vpc
=== RUN   TestAccEC2InstanceDataSource_placementGroup
=== PAUSE TestAccEC2InstanceDataSource_placementGroup
=== RUN   TestAccEC2InstanceDataSource_securityGroups
=== PAUSE TestAccEC2InstanceDataSource_securityGroups
=== RUN   TestAccEC2InstanceDataSource_vpcSecurityGroups
=== PAUSE TestAccEC2InstanceDataSource_vpcSecurityGroups
=== RUN   TestAccEC2InstanceDataSource_GetPasswordData_trueToFalse
=== PAUSE TestAccEC2InstanceDataSource_GetPasswordData_trueToFalse
=== RUN   TestAccEC2InstanceDataSource_GetPasswordData_falseToTrue
=== PAUSE TestAccEC2InstanceDataSource_GetPasswordData_falseToTrue
=== RUN   TestAccEC2InstanceDataSource_getUserData
=== PAUSE TestAccEC2InstanceDataSource_getUserData
=== RUN   TestAccEC2InstanceDataSource_GetUserData_noUserData
=== PAUSE TestAccEC2InstanceDataSource_GetUserData_noUserData
=== RUN   TestAccEC2InstanceDataSource_autoRecovery
=== PAUSE TestAccEC2InstanceDataSource_autoRecovery
=== RUN   TestAccEC2InstanceDataSource_creditSpecification
=== PAUSE TestAccEC2InstanceDataSource_creditSpecification
=== RUN   TestAccEC2InstanceDataSource_metadataOptions
=== PAUSE TestAccEC2InstanceDataSource_metadataOptions
=== RUN   TestAccEC2InstanceDataSource_enclaveOptions
=== PAUSE TestAccEC2InstanceDataSource_enclaveOptions
=== RUN   TestAccEC2InstanceDataSource_blockDeviceTags
=== PAUSE TestAccEC2InstanceDataSource_blockDeviceTags
=== RUN   TestAccEC2InstanceDataSource_disableAPIStopTermination
=== PAUSE TestAccEC2InstanceDataSource_disableAPIStopTermination
=== RUN   TestAccEC2InstanceDataSource_timeout
=== PAUSE TestAccEC2InstanceDataSource_timeout
=== CONT  TestAccEC2InstanceDataSource_basic
=== CONT  TestAccEC2InstanceDataSource_placementGroup
=== CONT  TestAccEC2InstanceDataSource_autoRecovery
=== CONT  TestAccEC2InstanceDataSource_blockDeviceTags
=== CONT  TestAccEC2InstanceDataSource_enclaveOptions
=== CONT  TestAccEC2InstanceDataSource_metadataOptions
=== CONT  TestAccEC2InstanceDataSource_GetUserData_noUserData
=== CONT  TestAccEC2InstanceDataSource_creditSpecification
=== CONT  TestAccEC2InstanceDataSource_timeout
=== CONT  TestAccEC2InstanceDataSource_RootBlockDevice_kmsKeyID
=== CONT  TestAccEC2InstanceDataSource_vpc
=== CONT  TestAccEC2InstanceDataSource_keyPair
=== CONT  TestAccEC2InstanceDataSource_ipv6Addresses
=== CONT  TestAccEC2InstanceDataSource_secondaryPrivateIPs
=== CONT  TestAccEC2InstanceDataSource_privateIP
=== CONT  TestAccEC2InstanceDataSource_disableAPIStopTermination
=== CONT  TestAccEC2InstanceDataSource_azUserData
=== CONT  TestAccEC2InstanceDataSource_EBSBlockDevice_kmsKeyID
=== CONT  TestAccEC2InstanceDataSource_rootInstanceStore
=== CONT  TestAccEC2InstanceDataSource_gp2IopsDevice
--- PASS: TestAccEC2InstanceDataSource_blockDeviceTags (77.80s)
=== CONT  TestAccEC2InstanceDataSource_gp3ThroughputDevice
--- PASS: TestAccEC2InstanceDataSource_basic (97.82s)
=== CONT  TestAccEC2InstanceDataSource_blockDevices
=== CONT  TestAccEC2InstanceDataSource_tags
--- PASS: TestAccEC2InstanceDataSource_keyPair (98.95s)
--- PASS: TestAccEC2InstanceDataSource_EBSBlockDevice_kmsKeyID (99.56s)
=== CONT  TestAccEC2InstanceDataSource_GetPasswordData_trueToFalse
--- PASS: TestAccEC2InstanceDataSource_creditSpecification (105.08s)
=== CONT  TestAccEC2InstanceDataSource_getUserData
--- PASS: TestAccEC2InstanceDataSource_secondaryPrivateIPs (106.33s)
=== CONT  TestAccEC2InstanceDataSource_GetPasswordData_falseToTrue
--- PASS: TestAccEC2InstanceDataSource_privateIP (106.46s)
=== CONT  TestAccEC2InstanceDataSource_vpcSecurityGroups
--- PASS: TestAccEC2InstanceDataSource_timeout (107.56s)
=== CONT  TestAccEC2InstanceDataSource_securityGroups
--- PASS: TestAccEC2InstanceDataSource_gp2IopsDevice (108.47s)
--- PASS: TestAccEC2InstanceDataSource_RootBlockDevice_kmsKeyID (119.95s)
--- PASS: TestAccEC2InstanceDataSource_ipv6Addresses (146.04s)
--- PASS: TestAccEC2InstanceDataSource_autoRecovery (147.10s)
--- PASS: TestAccEC2InstanceDataSource_azUserData (147.83s)
--- PASS: TestAccEC2InstanceDataSource_GetUserData_noUserData (153.56s)
--- PASS: TestAccEC2InstanceDataSource_vpc (160.61s)
--- PASS: TestAccEC2InstanceDataSource_disableAPIStopTermination (166.86s)
--- PASS: TestAccEC2InstanceDataSource_gp3ThroughputDevice (114.58s)
--- PASS: TestAccEC2InstanceDataSource_tags (94.59s)
--- PASS: TestAccEC2InstanceDataSource_securityGroups (99.11s)
--- PASS: TestAccEC2InstanceDataSource_blockDevices (117.46s)
--- PASS: TestAccEC2InstanceDataSource_vpcSecurityGroups (124.99s)
--- PASS: TestAccEC2InstanceDataSource_getUserData (128.57s)
--- PASS: TestAccEC2InstanceDataSource_GetPasswordData_trueToFalse (188.41s)
--- PASS: TestAccEC2InstanceDataSource_GetPasswordData_falseToTrue (202.21s)
--- PASS: TestAccEC2InstanceDataSource_enclaveOptions (319.35s)
--- PASS: TestAccEC2InstanceDataSource_rootInstanceStore (332.92s)
--- PASS: TestAccEC2InstanceDataSource_metadataOptions (347.74s)
--- PASS: TestAccEC2InstanceDataSource_placementGroup (368.07s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	370.523s
% make t T=TestAccEC2Instance_BlockDeviceTags K=ec2                
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2Instance_BlockDeviceTags'  -timeout 360m
=== RUN   TestAccEC2Instance_BlockDeviceTags_volumeTags
=== PAUSE TestAccEC2Instance_BlockDeviceTags_volumeTags
=== RUN   TestAccEC2Instance_BlockDeviceTags_attachedVolume
=== PAUSE TestAccEC2Instance_BlockDeviceTags_attachedVolume
=== RUN   TestAccEC2Instance_BlockDeviceTags_ebsAndRoot
=== PAUSE TestAccEC2Instance_BlockDeviceTags_ebsAndRoot
=== RUN   TestAccEC2Instance_BlockDeviceTags_defaultTagsVolumeTags
=== PAUSE TestAccEC2Instance_BlockDeviceTags_defaultTagsVolumeTags
=== RUN   TestAccEC2Instance_BlockDeviceTags_defaultTagsEBSRoot
=== PAUSE TestAccEC2Instance_BlockDeviceTags_defaultTagsEBSRoot
=== CONT  TestAccEC2Instance_BlockDeviceTags_volumeTags
=== CONT  TestAccEC2Instance_BlockDeviceTags_defaultTagsVolumeTags
=== CONT  TestAccEC2Instance_BlockDeviceTags_ebsAndRoot
=== CONT  TestAccEC2Instance_BlockDeviceTags_attachedVolume
=== CONT  TestAccEC2Instance_BlockDeviceTags_defaultTagsEBSRoot
--- PASS: TestAccEC2Instance_BlockDeviceTags_ebsAndRoot (198.70s)
--- PASS: TestAccEC2Instance_BlockDeviceTags_attachedVolume (223.81s)
--- PASS: TestAccEC2Instance_BlockDeviceTags_volumeTags (239.19s)
--- PASS: TestAccEC2Instance_BlockDeviceTags_defaultTagsVolumeTags (245.32s)
--- PASS: TestAccEC2Instance_BlockDeviceTags_defaultTagsEBSRoot (249.69s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	251.982s
% make t T=TestAccEC2SpotInstanceRequest_tags K=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2SpotInstanceRequest_tags'  -timeout 360m
=== RUN   TestAccEC2SpotInstanceRequest_tags
=== PAUSE TestAccEC2SpotInstanceRequest_tags
=== CONT  TestAccEC2SpotInstanceRequest_tags
--- PASS: TestAccEC2SpotInstanceRequest_tags (159.40s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	163.570s

Copy link

github-actions bot commented Mar 1, 2024

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. and removed size/XS Managed by automation to categorize the size of a PR. labels Mar 1, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 1, 2024
@github-actions github-actions bot added the size/XS Managed by automation to categorize the size of a PR. label Mar 1, 2024
@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Mar 1, 2024
@YakDriver YakDriver added this to the v5.39.1 milestone Mar 1, 2024
@YakDriver YakDriver merged commit 36f68db into main Mar 1, 2024
52 checks passed
@YakDriver YakDriver deleted the b-ec2-instance-ds-regression branch March 1, 2024 17:34
github-actions bot pushed a commit that referenced this pull request Mar 1, 2024
Copy link

github-actions bot commented Mar 6, 2024

This functionality has been released in v5.39.1 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. Thank you!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 6, 2024
Copy link

github-actions bot commented Apr 6, 2024

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
1 participant