-
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
r/route_table: Use configurable timeouts in aws_route #21161
r/route_table: Use configurable timeouts in aws_route #21161
Conversation
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.
Welcome @msahihi 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
8b52bd8
to
73927cb
Compare
I was just realizing how we needed to standardize all the route, route table handling and here's an excellent PR. Thanks for your work on this @msahihi ! |
Glad to help. I am happy to see @ewbankkit adapt other resources as well. Actually, since I didn't know which logic here we would like to follow, I didn't change it all over the place. |
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=TestAccAWSVPNGatewayRoutePropagation_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSVPNGatewayRoutePropagation_ -timeout 180m
=== RUN TestAccAWSVPNGatewayRoutePropagation_basic
=== PAUSE TestAccAWSVPNGatewayRoutePropagation_basic
=== RUN TestAccAWSVPNGatewayRoutePropagation_disappears
=== PAUSE TestAccAWSVPNGatewayRoutePropagation_disappears
=== CONT TestAccAWSVPNGatewayRoutePropagation_basic
=== CONT TestAccAWSVPNGatewayRoutePropagation_disappears
--- PASS: TestAccAWSVPNGatewayRoutePropagation_basic (56.55s)
--- PASS: TestAccAWSVPNGatewayRoutePropagation_disappears (57.14s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 60.278s
% ACCTEST_PARALLELISM=5 make testacc TESTARGS='-run=TestAccAWSRouteTableAssociation_\|TestAccAWSDefaultRouteTable_\|TestAccAWSRouteTable_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 5 -run=TestAccAWSRouteTableAssociation_\|TestAccAWSDefaultRouteTable_\|TestAccAWSRouteTable_ -timeout 180m
=== RUN TestAccAWSDefaultRouteTable_basic
=== PAUSE TestAccAWSDefaultRouteTable_basic
=== RUN TestAccAWSDefaultRouteTable_disappears_Vpc
=== PAUSE TestAccAWSDefaultRouteTable_disappears_Vpc
=== RUN TestAccAWSDefaultRouteTable_Route_ConfigMode
=== PAUSE TestAccAWSDefaultRouteTable_Route_ConfigMode
=== RUN TestAccAWSDefaultRouteTable_swap
=== PAUSE TestAccAWSDefaultRouteTable_swap
=== RUN TestAccAWSDefaultRouteTable_IPv4_To_TransitGateway
=== PAUSE TestAccAWSDefaultRouteTable_IPv4_To_TransitGateway
=== RUN TestAccAWSDefaultRouteTable_IPv4_To_VpcEndpoint
=== PAUSE TestAccAWSDefaultRouteTable_IPv4_To_VpcEndpoint
=== RUN TestAccAWSDefaultRouteTable_VpcEndpointAssociation
=== PAUSE TestAccAWSDefaultRouteTable_VpcEndpointAssociation
=== RUN TestAccAWSDefaultRouteTable_Tags
=== PAUSE TestAccAWSDefaultRouteTable_Tags
=== RUN TestAccAWSDefaultRouteTable_ConditionalCidrBlock
=== PAUSE TestAccAWSDefaultRouteTable_ConditionalCidrBlock
=== RUN TestAccAWSDefaultRouteTable_PrefixList_To_InternetGateway
=== PAUSE TestAccAWSDefaultRouteTable_PrefixList_To_InternetGateway
=== RUN TestAccAWSDefaultRouteTable_RevokeExistingRules
=== PAUSE TestAccAWSDefaultRouteTable_RevokeExistingRules
=== RUN TestAccAWSRouteTableAssociation_Subnet_basic
=== PAUSE TestAccAWSRouteTableAssociation_Subnet_basic
=== RUN TestAccAWSRouteTableAssociation_Subnet_ChangeRouteTable
=== PAUSE TestAccAWSRouteTableAssociation_Subnet_ChangeRouteTable
=== RUN TestAccAWSRouteTableAssociation_Gateway_basic
=== PAUSE TestAccAWSRouteTableAssociation_Gateway_basic
=== RUN TestAccAWSRouteTableAssociation_Gateway_ChangeRouteTable
=== PAUSE TestAccAWSRouteTableAssociation_Gateway_ChangeRouteTable
=== RUN TestAccAWSRouteTableAssociation_disappears
=== PAUSE TestAccAWSRouteTableAssociation_disappears
=== RUN TestAccAWSRouteTable_basic
=== PAUSE TestAccAWSRouteTable_basic
=== RUN TestAccAWSRouteTable_disappears
=== PAUSE TestAccAWSRouteTable_disappears
=== RUN TestAccAWSRouteTable_disappears_SubnetAssociation
=== PAUSE TestAccAWSRouteTable_disappears_SubnetAssociation
=== RUN TestAccAWSRouteTable_IPv4_To_InternetGateway
=== PAUSE TestAccAWSRouteTable_IPv4_To_InternetGateway
=== RUN TestAccAWSRouteTable_IPv4_To_Instance
=== PAUSE TestAccAWSRouteTable_IPv4_To_Instance
=== RUN TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway
=== PAUSE TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway
=== RUN TestAccAWSRouteTable_Tags
=== PAUSE TestAccAWSRouteTable_Tags
=== RUN TestAccAWSRouteTable_RequireRouteDestination
=== PAUSE TestAccAWSRouteTable_RequireRouteDestination
=== RUN TestAccAWSRouteTable_RequireRouteTarget
=== PAUSE TestAccAWSRouteTable_RequireRouteTarget
=== RUN TestAccAWSRouteTable_Route_ConfigMode
=== PAUSE TestAccAWSRouteTable_Route_ConfigMode
=== RUN TestAccAWSRouteTable_IPv4_To_TransitGateway
=== PAUSE TestAccAWSRouteTable_IPv4_To_TransitGateway
=== RUN TestAccAWSRouteTable_IPv4_To_VpcEndpoint
=== PAUSE TestAccAWSRouteTable_IPv4_To_VpcEndpoint
=== RUN TestAccAWSRouteTable_IPv4_To_CarrierGateway
=== PAUSE TestAccAWSRouteTable_IPv4_To_CarrierGateway
=== RUN TestAccAWSRouteTable_IPv4_To_LocalGateway
=== PAUSE TestAccAWSRouteTable_IPv4_To_LocalGateway
=== RUN TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection
=== PAUSE TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection
=== RUN TestAccAWSRouteTable_VgwRoutePropagation
=== PAUSE TestAccAWSRouteTable_VgwRoutePropagation
=== RUN TestAccAWSRouteTable_ConditionalCidrBlock
=== PAUSE TestAccAWSRouteTable_ConditionalCidrBlock
=== RUN TestAccAWSRouteTable_IPv4_To_NatGateway
=== PAUSE TestAccAWSRouteTable_IPv4_To_NatGateway
=== RUN TestAccAWSRouteTable_IPv6_To_NetworkInterface_Unattached
=== PAUSE TestAccAWSRouteTable_IPv6_To_NetworkInterface_Unattached
=== RUN TestAccAWSRouteTable_IPv4_To_NetworkInterfaces_Unattached
=== PAUSE TestAccAWSRouteTable_IPv4_To_NetworkInterfaces_Unattached
=== RUN TestAccAWSRouteTable_VpcMultipleCidrs
=== PAUSE TestAccAWSRouteTable_VpcMultipleCidrs
=== RUN TestAccAWSRouteTable_VpcClassicLink
=== PAUSE TestAccAWSRouteTable_VpcClassicLink
=== RUN TestAccAWSRouteTable_GatewayVpcEndpoint
=== PAUSE TestAccAWSRouteTable_GatewayVpcEndpoint
=== RUN TestAccAWSRouteTable_MultipleRoutes
=== PAUSE TestAccAWSRouteTable_MultipleRoutes
=== RUN TestAccAWSRouteTable_PrefixList_To_InternetGateway
=== PAUSE TestAccAWSRouteTable_PrefixList_To_InternetGateway
=== CONT TestAccAWSDefaultRouteTable_basic
=== CONT TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway
=== CONT TestAccAWSRouteTableAssociation_Subnet_basic
=== CONT TestAccAWSRouteTable_IPv4_To_Instance
=== CONT TestAccAWSRouteTable_IPv4_To_InternetGateway
--- PASS: TestAccAWSDefaultRouteTable_basic (32.74s)
=== CONT TestAccAWSRouteTable_disappears_SubnetAssociation
--- PASS: TestAccAWSRouteTableAssociation_Subnet_basic (44.89s)
=== CONT TestAccAWSRouteTable_disappears
--- PASS: TestAccAWSRouteTable_IPv6_To_EgressOnlyInternetGateway (44.97s)
=== CONT TestAccAWSRouteTable_basic
--- PASS: TestAccAWSRouteTable_disappears_SubnetAssociation (25.95s)
=== CONT TestAccAWSRouteTableAssociation_disappears
--- PASS: TestAccAWSRouteTable_IPv4_To_InternetGateway (62.26s)
=== CONT TestAccAWSRouteTableAssociation_Gateway_ChangeRouteTable
--- PASS: TestAccAWSRouteTable_disappears (21.38s)
=== CONT TestAccAWSRouteTableAssociation_Gateway_basic
--- PASS: TestAccAWSRouteTable_basic (23.10s)
=== CONT TestAccAWSRouteTableAssociation_Subnet_ChangeRouteTable
--- PASS: TestAccAWSRouteTableAssociation_disappears (39.97s)
=== CONT TestAccAWSDefaultRouteTable_VpcEndpointAssociation
--- PASS: TestAccAWSRouteTable_IPv4_To_Instance (127.29s)
=== CONT TestAccAWSDefaultRouteTable_RevokeExistingRules
--- PASS: TestAccAWSRouteTableAssociation_Subnet_ChangeRouteTable (60.89s)
=== CONT TestAccAWSDefaultRouteTable_PrefixList_To_InternetGateway
--- PASS: TestAccAWSDefaultRouteTable_VpcEndpointAssociation (39.45s)
=== CONT TestAccAWSDefaultRouteTable_ConditionalCidrBlock
--- PASS: TestAccAWSRouteTableAssociation_Gateway_basic (72.58s)
=== CONT TestAccAWSRouteTable_ConditionalCidrBlock
--- PASS: TestAccAWSRouteTableAssociation_Gateway_ChangeRouteTable (94.63s)
=== CONT TestAccAWSDefaultRouteTable_Tags
=== CONT TestAccAWSDefaultRouteTable_swap
--- PASS: TestAccAWSDefaultRouteTable_PrefixList_To_InternetGateway (59.18s)
--- PASS: TestAccAWSDefaultRouteTable_ConditionalCidrBlock (57.71s)
=== CONT TestAccAWSDefaultRouteTable_IPv4_To_VpcEndpoint
--- PASS: TestAccAWSRouteTable_ConditionalCidrBlock (58.99s)
=== CONT TestAccAWSDefaultRouteTable_IPv4_To_TransitGateway
resource_aws_default_route_table_test.go:229: Step 1/2 error: Error running apply: exit status 1
Error: error creating EC2 Transit Gateway: TransitGatewayLimitExceeded: TransitGateway limit exceeded
status code: 400, request id: 889751a0-12bd-412f-ac2b-fe53a91d877e
with aws_ec2_transit_gateway.test,
on terraform_plugin_test.tf line 30, in resource "aws_ec2_transit_gateway" "test":
30: resource "aws_ec2_transit_gateway" "test" {
--- FAIL: TestAccAWSDefaultRouteTable_IPv4_To_TransitGateway (13.18s)
=== CONT TestAccAWSDefaultRouteTable_Route_ConfigMode
--- PASS: TestAccAWSDefaultRouteTable_Tags (54.43s)
=== CONT TestAccAWSRouteTable_IPv4_To_VpcEndpoint
--- PASS: TestAccAWSDefaultRouteTable_RevokeExistingRules (101.38s)
=== CONT TestAccAWSRouteTable_VgwRoutePropagation
=== CONT TestAccAWSDefaultRouteTable_IPv4_To_VpcEndpoint
resource_aws_default_route_table_test.go:261: Step 1/3 error: Error running apply: exit status 1
Error: error adding VPC Endpoint Service permissions: InvalidPrincipal: Invalid Principal: 'arn:aws:sts::123456789012:assumed-role/terraform_team1_dev-developer/xyz@example.com'
status code: 400, request id: 09dacd97-3254-4fad-97b9-2162adbde7fe
with aws_vpc_endpoint_service.test,
on terraform_plugin_test.tf line 49, in resource "aws_vpc_endpoint_service" "test":
49: resource "aws_vpc_endpoint_service" "test" {
--- PASS: TestAccAWSDefaultRouteTable_swap (95.88s)
=== CONT TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection
--- PASS: TestAccAWSDefaultRouteTable_Route_ConfigMode (80.87s)
=== CONT TestAccAWSRouteTable_IPv4_To_LocalGateway
=== CONT TestAccAWSRouteTable_IPv4_To_VpcEndpoint
resource_aws_route_table_test.go:554: Step 1/2 error: Error running apply: exit status 1
Error: error adding VPC Endpoint Service permissions: InvalidPrincipal: Invalid Principal: 'arn:aws:sts::123456789012:assumed-role/terraform_team1_dev-developer/xyz@example.com'
status code: 400, request id: 077f0db6-8b72-46d5-a00e-b160e6560d10
with aws_vpc_endpoint_service.test,
on terraform_plugin_test.tf line 40, in resource "aws_vpc_endpoint_service" "test":
40: resource "aws_vpc_endpoint_service" "test" {
=== CONT TestAccAWSRouteTable_IPv4_To_LocalGateway
data_source_aws_outposts_outposts_test.go:67: skipping since no Outposts found
--- SKIP: TestAccAWSRouteTable_IPv4_To_LocalGateway (0.73s)
=== CONT TestAccAWSRouteTable_IPv4_To_CarrierGateway
--- FAIL: TestAccAWSDefaultRouteTable_IPv4_To_VpcEndpoint (108.46s)
=== CONT TestAccAWSRouteTable_VpcClassicLink
--- PASS: TestAccAWSRouteTable_VgwRoutePropagation (79.81s)
=== CONT TestAccAWSRouteTable_PrefixList_To_InternetGateway
--- PASS: TestAccAWSRouteTable_IPv4_To_VpcPeeringConnection (29.90s)
=== CONT TestAccAWSRouteTable_MultipleRoutes
--- FAIL: TestAccAWSRouteTable_IPv4_To_VpcEndpoint (108.94s)
=== CONT TestAccAWSRouteTable_GatewayVpcEndpoint
--- PASS: TestAccAWSRouteTable_IPv4_To_CarrierGateway (29.41s)
=== CONT TestAccAWSRouteTable_IPv4_To_TransitGateway
--- PASS: TestAccAWSRouteTable_VpcClassicLink (25.21s)
=== CONT TestAccAWSDefaultRouteTable_disappears_Vpc
=== CONT TestAccAWSRouteTable_IPv4_To_TransitGateway
resource_aws_route_table_test.go:518: Step 1/2 error: Error running apply: exit status 1
Error: error creating EC2 Transit Gateway: TransitGatewayLimitExceeded: TransitGateway limit exceeded
status code: 400, request id: 478517ee-f50e-4a73-81e1-8f468473b8cf
with aws_ec2_transit_gateway.test,
on terraform_plugin_test.tf line 30, in resource "aws_ec2_transit_gateway" "test":
30: resource "aws_ec2_transit_gateway" "test" {
--- FAIL: TestAccAWSRouteTable_IPv4_To_TransitGateway (13.34s)
=== CONT TestAccAWSRouteTable_Route_ConfigMode
--- PASS: TestAccAWSDefaultRouteTable_disappears_Vpc (14.54s)
=== CONT TestAccAWSRouteTable_IPv4_To_NetworkInterfaces_Unattached
--- PASS: TestAccAWSRouteTable_PrefixList_To_InternetGateway (40.17s)
=== CONT TestAccAWSRouteTable_VpcMultipleCidrs
--- PASS: TestAccAWSRouteTable_GatewayVpcEndpoint (38.48s)
=== CONT TestAccAWSRouteTable_IPv6_To_NetworkInterface_Unattached
--- PASS: TestAccAWSRouteTable_VpcMultipleCidrs (46.29s)
=== CONT TestAccAWSRouteTable_IPv4_To_NatGateway
--- PASS: TestAccAWSRouteTable_Route_ConfigMode (75.21s)
=== CONT TestAccAWSRouteTable_RequireRouteDestination
--- PASS: TestAccAWSRouteTable_IPv6_To_NetworkInterface_Unattached (60.80s)
=== CONT TestAccAWSRouteTable_Tags
--- PASS: TestAccAWSRouteTable_IPv4_To_NetworkInterfaces_Unattached (128.96s)
=== CONT TestAccAWSRouteTable_RequireRouteTarget
--- PASS: TestAccAWSRouteTable_Tags (55.59s)
--- PASS: TestAccAWSRouteTable_RequireRouteTarget (12.65s)
--- PASS: TestAccAWSRouteTable_MultipleRoutes (237.76s)
--- PASS: TestAccAWSRouteTable_IPv4_To_NatGateway (211.98s)
--- PASS: TestAccAWSRouteTable_RequireRouteDestination (339.87s)
Failures not related to this change.
@msahihi Thanks for the contribution 🎉 👏. |
This functionality has been released in v3.62.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. |
Community Note
Closes #20227.
Closes #19985.
Relates #21062.
Output from acceptance testing: