-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_vpc and r/aws_default_vpc use AWS SDKv2 #32368
Conversation
Community NoteVoting for Prioritization
For Submitters
|
9db534b
to
cbb07d8
Compare
cbb07d8
to
56d2fd9
Compare
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='-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 -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
=== PAUSE TestAccVPC_IPAMIPv4BasicNetmask
=== RUN TestAccVPC_IPAMIPv4BasicExplicitCIDR
=== PAUSE TestAccVPC_IPAMIPv4BasicExplicitCIDR
=== RUN TestAccVPC_IPAMIPv6
=== PAUSE TestAccVPC_IPAMIPv6
=== CONT TestAccVPC_basic
=== CONT TestAccVPC_DynamicResourceTags_ignoreChanges
--- PASS: TestAccVPC_basic (30.52s)
=== CONT TestAccVPC_DefaultTags_updateToProviderOnly
--- PASS: TestAccVPC_DynamicResourceTags_ignoreChanges (48.81s)
=== CONT TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges
--- PASS: TestAccVPC_DefaultTags_updateToProviderOnly (46.83s)
=== CONT TestAccVPC_DefaultTagsProviderAndResource_moveDuplicateTags
--- PASS: TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges (49.96s)
=== CONT TestAccVPC_DefaultTagsProviderAndResource_duplicateTag
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_duplicateTag (21.88s)
=== CONT TestAccVPC_DefaultTagsProviderAndResource_overlappingTag
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_moveDuplicateTags (61.41s)
=== CONT TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_overlappingTag (64.57s)
=== CONT TestAccVPC_DefaultTags_updateToResourceOnly
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag (64.70s)
=== CONT TestAccVPC_tags_null
--- PASS: TestAccVPC_tags_null (25.10s)
=== CONT TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly
--- PASS: TestAccVPC_DefaultTags_updateToResourceOnly (45.90s)
=== CONT TestAccVPC_DefaultTags_zeroValue
--- PASS: TestAccVPC_DefaultTags_zeroValue (67.90s)
=== CONT TestAccVPC_enableNetworkAddressUsageMetrics
--- PASS: TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly (72.94s)
=== CONT TestAccVPC_IPAMIPv6
--- PASS: TestAccVPC_enableNetworkAddressUsageMetrics (38.31s)
=== CONT TestAccVPC_IPAMIPv4BasicExplicitCIDR
--- PASS: TestAccVPC_IPAMIPv4BasicExplicitCIDR (1204.13s)
=== CONT TestAccVPC_IPAMIPv4BasicNetmask
--- PASS: TestAccVPC_IPAMIPv6 (1154.60s)
=== CONT TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup
--- PASS: TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup (82.01s)
=== CONT TestAccVPC_assignGeneratedIPv6CIDRBlock
--- PASS: TestAccVPC_assignGeneratedIPv6CIDRBlock (93.62s)
=== CONT TestAccVPC_updateDNSHostnames
--- PASS: TestAccVPC_updateDNSHostnames (50.32s)
=== CONT TestAccVPC_disabledDNSSupport
--- PASS: TestAccVPC_disabledDNSSupport (37.08s)
=== CONT TestAccVPC_bothDNSOptionsSet
--- PASS: TestAccVPC_bothDNSOptionsSet (37.47s)
=== CONT TestAccVPC_ignoreTags
--- PASS: TestAccVPC_ignoreTags (47.77s)
=== CONT TestAccVPC_tenancy
--- PASS: TestAccVPC_tenancy (67.12s)
=== CONT TestAccVPC_tags
--- PASS: TestAccVPC_IPAMIPv4BasicNetmask (1174.80s)
=== CONT TestAccVPC_tags_computed
--- PASS: TestAccVPC_tags_computed (26.42s)
=== CONT TestAccVPC_disappears
--- PASS: TestAccVPC_tags (68.29s)
=== CONT TestAccVPC_defaultAndIgnoreTags
--- PASS: TestAccVPC_disappears (21.05s)
--- PASS: TestAccVPC_defaultAndIgnoreTags (48.88s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 2801.447s
% AWS_DEFAULT_REGION=us-east-2 make testacc TESTARGS='-run=TestAccVPCDefaultVPCAndSubnet_serial/VPC' PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run=TestAccVPCDefaultVPCAndSubnet_serial/VPC -timeout 180m
=== RUN TestAccVPCDefaultVPCAndSubnet_serial
=== PAUSE TestAccVPCDefaultVPCAndSubnet_serial
=== CONT TestAccVPCDefaultVPCAndSubnet_serial
=== RUN TestAccVPCDefaultVPCAndSubnet_serial/VPC
=== RUN TestAccVPCDefaultVPCAndSubnet_serial/VPC/existing.basic
=== RUN TestAccVPCDefaultVPCAndSubnet_serial/VPC/existing.assignGeneratedIPv6CIDRBlock
=== RUN TestAccVPCDefaultVPCAndSubnet_serial/VPC/existing.forceDestroy
=== RUN TestAccVPCDefaultVPCAndSubnet_serial/VPC/notFound.basic
vpc_default_vpc_test.go:58: Deleting existing default VPC: vpc-062a5972cceef55b3
=== RUN TestAccVPCDefaultVPCAndSubnet_serial/VPC/notFound.assignGeneratedIPv6CIDRBlock
vpc_default_vpc_test.go:58: Deleting existing default VPC: vpc-0c1dc5f4e59ce6de4
=== RUN TestAccVPCDefaultVPCAndSubnet_serial/VPC/notFound.forceDestroy
vpc_default_vpc_test.go:58: Deleting existing default VPC: vpc-024d67583507981cc
=== RUN TestAccVPCDefaultVPCAndSubnet_serial/VPC/notFound.assignGeneratedIPv6CIDRBlockAdoption
vpc_default_vpc_test.go:58: Deleting existing default VPC: vpc-098382b86532c579c
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial (240.58s)
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial/VPC (240.58s)
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial/VPC/existing.basic (18.42s)
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial/VPC/existing.assignGeneratedIPv6CIDRBlock (29.03s)
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial/VPC/existing.forceDestroy (42.00s)
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial/VPC/notFound.basic (20.63s)
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial/VPC/notFound.assignGeneratedIPv6CIDRBlock (30.78s)
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial/VPC/notFound.forceDestroy (22.99s)
--- PASS: TestAccVPCDefaultVPCAndSubnet_serial/VPC/notFound.assignGeneratedIPv6CIDRBlockAdoption (76.73s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 245.732s
@mattburgess Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.10.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
Migrate
aws_vpc
andaws_default_vpc
over to use v2 of the AWS SDK. In order to avoid having to migrate all callers of the variousFind
,Wait
, andStatus
functions, this PR introducesV2
equivalents with the intention that they'll be renamed back again wholesale once the last of the callers of the original functions have been removed.This is a 'tentative' PR - I don't mind doing the work to convert other resources over to the v2 SDK as and when time allows, but appreciate it's a lot of code churn and a large number of PRs will be required, so can well imagine you might not want to entertain them.
Relations
Relates #31345 (inasmuch as if we can remove all callers of the v1 SDK it may shrink the binary size down a bit, but I fully appreciate that's a mammoth undertaking).
References
Output from Acceptance Testing