-
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
ec2: fix unretriable error when creating vpc, while reading vpc attributes #31877
ec2: fix unretriable error when creating vpc, while reading vpc attributes #31877
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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 🚀.
% make testacc TESTARGS='-short -run=TestAccVPC_' PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2 -short -run=TestAccVPC_ -timeout 180m
=== RUN TestAccVPC_basic
=== PAUSE TestAccVPC_basic
=== RUN TestAccVPC_disappears
=== PAUSE TestAccVPC_disappears
=== RUN TestAccVPC_tags
=== PAUSE TestAccVPC_tags
=== RUN TestAccVPC_tags_computed
=== PAUSE TestAccVPC_tags_computed
=== RUN TestAccVPC_tags_null
=== PAUSE TestAccVPC_tags_null
=== RUN TestAccVPC_DefaultTags_zeroValue
=== PAUSE TestAccVPC_DefaultTags_zeroValue
=== RUN TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly
=== PAUSE TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly
=== RUN TestAccVPC_DefaultTags_updateToProviderOnly
=== PAUSE TestAccVPC_DefaultTags_updateToProviderOnly
=== RUN TestAccVPC_DefaultTags_updateToResourceOnly
=== PAUSE TestAccVPC_DefaultTags_updateToResourceOnly
=== RUN TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag
=== PAUSE TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag
=== RUN TestAccVPC_DefaultTagsProviderAndResource_overlappingTag
=== PAUSE TestAccVPC_DefaultTagsProviderAndResource_overlappingTag
=== RUN TestAccVPC_DefaultTagsProviderAndResource_duplicateTag
=== PAUSE TestAccVPC_DefaultTagsProviderAndResource_duplicateTag
=== RUN TestAccVPC_DefaultTagsProviderAndResource_moveDuplicateTags
=== PAUSE TestAccVPC_DefaultTagsProviderAndResource_moveDuplicateTags
=== RUN TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges
=== PAUSE TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges
=== RUN TestAccVPC_DynamicResourceTags_ignoreChanges
=== PAUSE TestAccVPC_DynamicResourceTags_ignoreChanges
=== RUN TestAccVPC_defaultAndIgnoreTags
=== PAUSE TestAccVPC_defaultAndIgnoreTags
=== RUN TestAccVPC_ignoreTags
=== PAUSE TestAccVPC_ignoreTags
=== RUN TestAccVPC_tenancy
=== PAUSE TestAccVPC_tenancy
=== RUN TestAccVPC_updateDNSHostnames
=== PAUSE TestAccVPC_updateDNSHostnames
=== RUN TestAccVPC_bothDNSOptionsSet
=== PAUSE TestAccVPC_bothDNSOptionsSet
=== RUN TestAccVPC_disabledDNSSupport
=== PAUSE TestAccVPC_disabledDNSSupport
=== RUN TestAccVPC_enableNetworkAddressUsageMetrics
=== PAUSE TestAccVPC_enableNetworkAddressUsageMetrics
=== RUN TestAccVPC_assignGeneratedIPv6CIDRBlock
=== PAUSE TestAccVPC_assignGeneratedIPv6CIDRBlock
=== RUN TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup
=== PAUSE TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup
=== RUN TestAccVPC_IPAMIPv4BasicNetmask
vpc_test.go:1015: skipping long-running test in short mode
--- SKIP: TestAccVPC_IPAMIPv4BasicNetmask (0.00s)
=== RUN TestAccVPC_IPAMIPv4BasicExplicitCIDR
vpc_test.go:1042: skipping long-running test in short mode
--- SKIP: TestAccVPC_IPAMIPv4BasicExplicitCIDR (0.00s)
=== RUN TestAccVPC_IPAMIPv6
vpc_test.go:1070: skipping long-running test in short mode
--- SKIP: TestAccVPC_IPAMIPv6 (0.00s)
=== CONT TestAccVPC_basic
=== CONT TestAccVPC_DefaultTagsProviderAndResource_moveDuplicateTags
--- PASS: TestAccVPC_basic (27.67s)
=== CONT TestAccVPC_updateDNSHostnames
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_moveDuplicateTags (53.21s)
=== CONT TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup
--- PASS: TestAccVPC_updateDNSHostnames (48.53s)
=== CONT TestAccVPC_assignGeneratedIPv6CIDRBlock
--- PASS: TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup (76.46s)
=== CONT TestAccVPC_enableNetworkAddressUsageMetrics
--- PASS: TestAccVPC_enableNetworkAddressUsageMetrics (36.60s)
=== CONT TestAccVPC_disabledDNSSupport
--- PASS: TestAccVPC_assignGeneratedIPv6CIDRBlock (90.53s)
=== CONT TestAccVPC_bothDNSOptionsSet
--- PASS: TestAccVPC_disabledDNSSupport (36.59s)
=== CONT TestAccVPC_defaultAndIgnoreTags
--- PASS: TestAccVPC_bothDNSOptionsSet (36.85s)
=== CONT TestAccVPC_tenancy
--- PASS: TestAccVPC_defaultAndIgnoreTags (44.51s)
=== CONT TestAccVPC_ignoreTags
--- PASS: TestAccVPC_tenancy (63.69s)
=== CONT TestAccVPC_DynamicResourceTags_ignoreChanges
--- PASS: TestAccVPC_ignoreTags (46.71s)
=== CONT TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly
--- PASS: TestAccVPC_DynamicResourceTags_ignoreChanges (45.61s)
=== CONT TestAccVPC_DefaultTagsProviderAndResource_duplicateTag
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_duplicateTag (19.19s)
=== CONT TestAccVPC_DefaultTagsProviderAndResource_overlappingTag
--- PASS: TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly (55.91s)
=== CONT TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_overlappingTag (56.82s)
=== CONT TestAccVPC_DefaultTags_updateToResourceOnly
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag (59.13s)
=== CONT TestAccVPC_DefaultTags_updateToProviderOnly
--- PASS: TestAccVPC_DefaultTags_updateToResourceOnly (42.87s)
=== CONT TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges
--- PASS: TestAccVPC_DefaultTags_updateToProviderOnly (46.63s)
=== CONT TestAccVPC_tags_computed
--- PASS: TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges (45.76s)
=== CONT TestAccVPC_DefaultTags_zeroValue
--- PASS: TestAccVPC_tags_computed (24.80s)
=== CONT TestAccVPC_tags_null
--- PASS: TestAccVPC_tags_null (21.69s)
=== CONT TestAccVPC_tags
--- PASS: TestAccVPC_DefaultTags_zeroValue (50.86s)
=== CONT TestAccVPC_disappears
--- PASS: TestAccVPC_disappears (17.79s)
--- PASS: TestAccVPC_tags (59.24s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 567.455s
@FabianPonce Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.3.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. Thank you! |
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. |
Description
We run Terraform in CI/CD and there appears to be a race condition in VPC creation. While the provider correctly waits up to 2 minutes for the VPC to be created and return an existant resource, the VPC attributes are assumed to return successfully. I regularly see the following output when creating VPCs:
Re-attempting the Terraform run fixes the issue, but this is suboptimal. This PR treats the VPC attributes to the same retry logic as the VPC reading.
Relations
References
Output from Acceptance Testing
I will re-edit the above tests once I have time to run in sequence since the maximum IPAMs is 1 per region.