-
Couldn't load subscription status.
- Fork 9.8k
Add parameterized resource identity to aws_route
#43910
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
Conversation
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
|
This resource identity implementation is currently blocked. The mismatch between the resource identifier attribute and expected import attributes ( Additional support must be added from "at most one of" optional arguments within the import schema before proceeding. |
Adds parameterized resource identity to the `aws_route` resource.
Identity tests still failing as the configured `id` attribute is missing
the expected `_` separator. Additional investigation required.
```console
% make testacc PKG=vpc TESTS=TestAccVPCRoute_Identity_Basic
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.6 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCRoute_Identity_Basic' -timeout 360m -vet=off
2025/08/26 16:59:57 Creating Terraform AWS Provider (SDKv2-style)...
2025/08/26 16:59:57 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN TestAccVPCRoute_Identity_Basic
=== PAUSE TestAccVPCRoute_Identity_Basic
=== CONT TestAccVPCRoute_Identity_Basic
vpc_route_identity_gen_test.go:30: Step 2/4 error running import: exit status 1
Error: unexpected format of ID ("r-rtb-0e1c77d84ed2e0b022218071545"), expected ROUTETABLEID_DESTINATION
--- FAIL: TestAccVPCRoute_Identity_Basic (20.94s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 27.950s
FAIL
make: *** [testacc] Error 1
```
|
#44043 added support for "at most one of" optional arguments in generated identity tests. |
```console
% make testacc PKG=vpc TESTS=TestAccVPCRoute_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.6 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCRoute_' -timeout 360m -vet=off
2025/08/27 15:39:29 Creating Terraform AWS Provider (SDKv2-style)...
2025/08/27 15:39:29 Initializing Terraform AWS Provider (SDKv2-style)...
=== NAME TestAccVPCRoute_ipv4ToCarrierGateway
wavelength_carrier_gateway_test.go:198: skipping since no Wavelength Zones are available
--- SKIP: TestAccVPCRoute_ipv4ToCarrierGateway (0.74s)
=== CONT TestAccVPCRoute_basic
--- PASS: TestAccVPCRoute_localRouteImport (27.20s)
=== CONT TestAccVPCRoute_Disappears_routeTable
--- PASS: TestAccVPCRoute_ipv4ToVPCPeeringConnection (30.07s)
=== CONT TestAccVPCRoute_localRouteCreateError
--- PASS: TestAccVPCRoute_basic (31.51s)
=== CONT TestAccVPCRoute_disappears
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_unattached (34.15s)
=== CONT TestAccVPCRoute_conditionalCIDRBlock
--- PASS: TestAccVPCRoute_ipv6ToVPCPeeringConnection (44.53s)
=== CONT TestAccVPCRoute_ipv6ToVPCEndpoint
--- PASS: TestAccVPCRoute_Identity_Basic (46.27s)
=== CONT TestAccVPCRoute_IPv6Update_target
--- PASS: TestAccVPCRoute_doesNotCrashWithVPCEndpoint (46.64s)
=== CONT TestAccVPCRoute_IPv4Update_target
--- PASS: TestAccVPCRoute_IPv6ToNetworkInterface_unattached (46.65s)
=== CONT TestAccVPCRoute_prefixListToInternetGateway
--- PASS: TestAccVPCRoute_Disappears_routeTable (22.88s)
=== CONT TestAccVPCRoute_Identity_ExistingResource
--- PASS: TestAccVPCRoute_disappears (23.64s)
=== CONT TestAccVPCRoute_Identity_RegionOverride
--- PASS: TestAccVPCRoute_localRouteCreateError (27.11s)
=== CONT TestAccVPCRoute_localRouteImportAndUpdate
--- PASS: TestAccVPCRoute_ipv6ToEgressOnlyInternetGateway (57.95s)
=== CONT TestAccVPCRoute_prefixListToTransitGateway
--- PASS: TestAccVPCRoute_prefixListToInternetGateway (33.31s)
=== CONT TestAccVPCRoute_prefixListToEgressOnlyInternetGateway
--- PASS: TestAccVPCRoute_conditionalCIDRBlock (51.62s)
=== CONT TestAccVPCRoute_prefixListToLocalGateway
vpc_route_test.go:2166: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_prefixListToLocalGateway (0.59s)
=== CONT TestAccVPCRoute_duplicate
--- PASS: TestAccVPCRoute_Identity_RegionOverride (30.63s)
=== CONT TestAccVPCRoute_prefixListToCarrierGateway
wavelength_carrier_gateway_test.go:198: skipping since no Wavelength Zones are available
--- SKIP: TestAccVPCRoute_prefixListToCarrierGateway (0.25s)
=== CONT TestAccVPCRoute_PrefixListToNetworkInterface_attached
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_attached (92.36s)
=== CONT TestAccVPCRoute_prefixListToNatGateway
--- PASS: TestAccVPCRoute_duplicate (12.42s)
=== CONT TestAccVPCRoute_prefixListToVPCPeeringConnection
--- PASS: TestAccVPCRoute_ipv4ToInstance (101.55s)
=== CONT TestAccVPCRoute_ipv6ToInstance
--- PASS: TestAccVPCRoute_Identity_ExistingResource (54.36s)
=== CONT TestAccVPCRoute_ipv6ToInternetGateway
--- PASS: TestAccVPCRoute_ipv6ToVPNGateway (108.35s)
=== CONT TestAccVPCRoute_ipv6ToLocalGateway
vpc_route_test.go:1066: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_ipv6ToLocalGateway (0.15s)
=== CONT TestAccVPCRoute_PrefixListToNetworkInterface_unattached
--- PASS: TestAccVPCRoute_localRouteImportAndUpdate (52.04s)
=== CONT TestAccVPCRoute_prefixListToInstance
--- PASS: TestAccVPCRoute_ipv4ToVPNGateway (109.48s)
=== CONT TestAccVPCRoute_ipv4ToLocalGateway
vpc_route_test.go:1019: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_ipv4ToLocalGateway (0.17s)
--- PASS: TestAccVPCRoute_prefixListToVPNGateway (110.05s)
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_twoAttachments (113.33s)
--- PASS: TestAccVPCRoute_prefixListToEgressOnlyInternetGateway (38.75s)
--- PASS: TestAccVPCRoute_prefixListToVPCPeeringConnection (29.25s)
--- PASS: TestAccVPCRoute_ipv6ToInternetGateway (32.21s)
--- PASS: TestAccVPCRoute_PrefixListToNetworkInterface_unattached (30.01s)
--- PASS: TestAccVPCRoute_ipv6ToInstance (89.50s)
--- PASS: TestAccVPCRoute_prefixListToInstance (89.78s)
--- PASS: TestAccVPCRoute_PrefixListToNetworkInterface_attached (112.51s)
--- PASS: TestAccVPCRoute_ipv4ToNatGateway (215.04s)
--- PASS: TestAccVPCRoute_ipv6ToNatGateway (226.33s)
--- PASS: TestAccVPCRoute_IPv6Update_target (218.73s)
--- PASS: TestAccVPCRoute_prefixListToNatGateway (178.78s)
--- PASS: TestAccVPCRoute_ipv6ToTransitGateway (382.52s)
--- PASS: TestAccVPCRoute_ipv4ToTransitGateway (382.83s)
--- PASS: TestAccVPCRoute_prefixListToTransitGateway (375.40s)
--- PASS: TestAccVPCRoute_ipv6ToVPCEndpoint (404.25s)
--- PASS: TestAccVPCRoute_ipv4ToVPCEndpoint (461.01s)
--- PASS: TestAccVPCRoute_IPv4Update_target (574.28s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 627.587s
```
```console
% make testacc PKG=vpc TESTS=TestAccVPCRoute_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.6 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCRoute_' -timeout 360m -vet=off
2025/08/27 16:14:07 Creating Terraform AWS Provider (SDKv2-style)...
2025/08/27 16:14:07 Initializing Terraform AWS Provider (SDKv2-style)...
=== NAME TestAccVPCRoute_ipv4ToCarrierGateway
wavelength_carrier_gateway_test.go:198: skipping since no Wavelength Zones are available
--- SKIP: TestAccVPCRoute_ipv4ToCarrierGateway (1.00s)
=== CONT TestAccVPCRoute_ipv6ToTransitGateway
=== NAME TestAccVPCRoute_prefixListToCarrierGateway
wavelength_carrier_gateway_test.go:198: skipping since no Wavelength Zones are available
--- SKIP: TestAccVPCRoute_prefixListToCarrierGateway (1.16s)
=== CONT TestAccVPCRoute_ipv6ToVPCPeeringConnection
=== NAME TestAccVPCRoute_prefixListToLocalGateway
vpc_route_test.go:2166: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_prefixListToLocalGateway (1.51s)
=== CONT TestAccVPCRoute_ipv6ToInstance
--- PASS: TestAccVPCRoute_duplicate (20.83s)
=== CONT TestAccVPCRoute_ipv6ToInternetGateway
--- PASS: TestAccVPCRoute_localRouteImport (29.55s)
=== CONT TestAccVPCRoute_IPv6ToNetworkInterface_unattached
--- PASS: TestAccVPCRoute_ipv4ToVPCPeeringConnection (31.99s)
=== CONT TestAccVPCRoute_basic
--- PASS: TestAccVPCRoute_prefixListToInternetGateway (37.99s)
=== CONT TestAccVPCRoute_Disappears_routeTable
--- PASS: TestAccVPCRoute_ipv6ToVPCPeeringConnection (41.40s)
=== CONT TestAccVPCRoute_disappears
--- PASS: TestAccVPCRoute_Identity_Basic (44.02s)
=== CONT TestAccVPCRoute_Identity_ExistingResource
--- PASS: TestAccVPCRoute_doesNotCrashWithVPCEndpoint (45.10s)
=== CONT TestAccVPCRoute_conditionalCIDRBlock
--- PASS: TestAccVPCRoute_prefixListToEgressOnlyInternetGateway (47.44s)
=== CONT TestAccVPCRoute_localRouteCreateError
--- PASS: TestAccVPCRoute_ipv6ToEgressOnlyInternetGateway (56.63s)
=== CONT TestAccVPCRoute_PrefixListToNetworkInterface_unattached
--- PASS: TestAccVPCRoute_ipv6ToInternetGateway (36.31s)
=== CONT TestAccVPCRoute_IPv6Update_target
--- PASS: TestAccVPCRoute_basic (25.64s)
=== CONT TestAccVPCRoute_prefixListToInstance
--- PASS: TestAccVPCRoute_Disappears_routeTable (23.71s)
=== CONT TestAccVPCRoute_IPv4Update_target
--- PASS: TestAccVPCRoute_localRouteImportAndUpdate (65.54s)
=== CONT TestAccVPCRoute_PrefixListToNetworkInterface_attached
--- PASS: TestAccVPCRoute_disappears (25.63s)
=== CONT TestAccVPCRoute_IPv4ToNetworkInterface_attached
--- PASS: TestAccVPCRoute_IPv6ToNetworkInterface_unattached (42.62s)
=== CONT TestAccVPCRoute_prefixListToNatGateway
--- PASS: TestAccVPCRoute_localRouteCreateError (29.47s)
=== CONT TestAccVPCRoute_IPv4ToNetworkInterface_twoAttachments
--- PASS: TestAccVPCRoute_PrefixListToNetworkInterface_unattached (37.27s)
=== CONT TestAccVPCRoute_prefixListToVPCPeeringConnection
--- PASS: TestAccVPCRoute_conditionalCIDRBlock (51.45s)
=== CONT TestAccVPCRoute_ipv4ToInstance
--- PASS: TestAccVPCRoute_ipv4ToVPNGateway (104.61s)
=== CONT TestAccVPCRoute_ipv6ToLocalGateway
--- PASS: TestAccVPCRoute_prefixListToVPNGateway (104.89s)
=== CONT TestAccVPCRoute_Identity_RegionOverride
--- PASS: TestAccVPCRoute_Identity_ExistingResource (60.91s)
=== CONT TestAccVPCRoute_ipv4ToLocalGateway
vpc_route_test.go:1019: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_ipv4ToLocalGateway (0.20s)
=== CONT TestAccVPCRoute_ipv6ToVPCEndpoint
=== NAME TestAccVPCRoute_ipv6ToLocalGateway
vpc_route_test.go:1066: skipping since no Outposts found
--- SKIP: TestAccVPCRoute_ipv6ToLocalGateway (0.53s)
=== CONT TestAccVPCRoute_IPv4ToNetworkInterface_unattached
--- PASS: TestAccVPCRoute_ipv6ToVPNGateway (122.64s)
--- PASS: TestAccVPCRoute_prefixListToVPCPeeringConnection (34.75s)
--- PASS: TestAccVPCRoute_ipv6ToInstance (131.66s)
--- PASS: TestAccVPCRoute_prefixListToInstance (77.02s)
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_unattached (29.57s)
--- PASS: TestAccVPCRoute_Identity_RegionOverride (33.35s)
--- PASS: TestAccVPCRoute_PrefixListToNetworkInterface_attached (100.33s)
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_attached (128.58s)
--- PASS: TestAccVPCRoute_ipv6ToNatGateway (198.11s)
--- PASS: TestAccVPCRoute_IPv4ToNetworkInterface_twoAttachments (121.44s)
--- PASS: TestAccVPCRoute_ipv4ToInstance (101.89s)
--- PASS: TestAccVPCRoute_ipv4ToNatGateway (227.38s)
--- PASS: TestAccVPCRoute_IPv6Update_target (207.40s)
--- PASS: TestAccVPCRoute_prefixListToNatGateway (201.49s)
--- PASS: TestAccVPCRoute_ipv4ToTransitGateway (427.06s)
--- PASS: TestAccVPCRoute_ipv6ToTransitGateway (427.16s)
--- PASS: TestAccVPCRoute_prefixListToTransitGateway (428.28s)
--- PASS: TestAccVPCRoute_ipv4ToVPCEndpoint (456.30s)
--- PASS: TestAccVPCRoute_ipv6ToVPCEndpoint (357.53s)
--- PASS: TestAccVPCRoute_IPv4Update_target (568.99s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 637.557s
```
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 🚀.
|
Warning This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
|
This functionality has been released in v6.11.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
Adds parameterized resource identity to the
aws_routeresource.Relations
Relates #42983
Relates #42988
Output from Acceptance Testing