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

VPC: Ignore route table routes managed by VPC Lattice #30515

Merged
merged 5 commits into from
Apr 6, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Apr 6, 2023

Description

When an association is made between a VPC Lattice service network and a VPC,
additional IPv4 and IPv6 destinations are added to that VPC's route tables:

% aws ec2 describe-route-tables --route-table-ids rtb-b2012dc9
{
    "RouteTables": [
        {
            "Associations": [
                {
                    "Main": true,
                    "RouteTableAssociationId": "rtbassoc-6d565b10",
                    "RouteTableId": "rtb-b2012dc9",
                    "AssociationState": {
                        "State": "associated"
                    }
                }
            ],
            "PropagatingVgws": [],
            "RouteTableId": "rtb-b2012dc9",
            "Routes": [
                {
                    "DestinationCidrBlock": "172.31.0.0/16",
                    "GatewayId": "local",
                    "Origin": "CreateRouteTable",
                    "State": "active"
                },
                {
                    "DestinationCidrBlock": "0.0.0.0/0",
                    "GatewayId": "igw-6aae1a13",
                    "Origin": "CreateRoute",
                    "State": "active"
                },
                {
                    "DestinationCidrBlock": "169.254.171.0/24",
                    "GatewayId": "VpcLattice",
                    "Origin": "CreateRoute",
                    "State": "active"
                },
                {
                    "DestinationIpv6CidrBlock": "fd00:ec2:80::/64",
                    "GatewayId": "VpcLattice",
                    "Origin": "CreateRoute",
                    "State": "active"
                }
            ],
            "Tags": [],
            "VpcId": "vpc-35b2f14d",
            "OwnerId": "123456789012"
        }
    ]
}

Ignore these routes as they are not managed by Terraform.

Relations

Relates #30380.

Output from Acceptance Testing

Cannot be tested via Terraform configuration until #30411 is implemented.

% make testacc TESTARGS='-run=TestAccVPCRouteTable_basic\|TestAccVPCRouteTableDataSource_basic\|TestAccVPCDefaultRouteTable_basic' PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccVPCRouteTable_basic\|TestAccVPCRouteTableDataSource_basic\|TestAccVPCDefaultRouteTable_basic -timeout 180m
=== RUN   TestAccVPCDefaultRouteTable_basic
=== PAUSE TestAccVPCDefaultRouteTable_basic
=== RUN   TestAccVPCRouteTableDataSource_basic
=== PAUSE TestAccVPCRouteTableDataSource_basic
=== RUN   TestAccVPCRouteTable_basic
=== PAUSE TestAccVPCRouteTable_basic
=== CONT  TestAccVPCDefaultRouteTable_basic
=== CONT  TestAccVPCRouteTable_basic
=== CONT  TestAccVPCRouteTableDataSource_basic
--- PASS: TestAccVPCRouteTableDataSource_basic (23.35s)
--- PASS: TestAccVPCRouteTable_basic (23.75s)
--- PASS: TestAccVPCDefaultRouteTable_basic (30.82s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	36.348s

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

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 service/vpc Issues and PRs that pertain to the vpc service. sweeper Pertains to changes to or issues with the sweeper. size/XS Managed by automation to categorize the size of a PR. labels Apr 6, 2023
@ewbankkit ewbankkit added the enhancement Requests to existing resources that expand the functionality or scope. label Apr 6, 2023
Copy link
Member

@jar-b jar-b left a 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=TestAccVPCRouteTable_basic\|TestAccVPCRouteTableDataSource_basic\|TestAccVPCDefaultRouteTable_basic' PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccVPCRouteTable_basic\|TestAccVPCRouteTableDataSource_basic\|TestAccVPCDefaultRouteTable_basic -timeout 180m
=== RUN   TestAccVPCDefaultRouteTable_basic
=== PAUSE TestAccVPCDefaultRouteTable_basic
=== RUN   TestAccVPCRouteTableDataSource_basic
=== PAUSE TestAccVPCRouteTableDataSource_basic
=== RUN   TestAccVPCRouteTable_basic
=== PAUSE TestAccVPCRouteTable_basic
=== CONT  TestAccVPCDefaultRouteTable_basic
=== CONT  TestAccVPCRouteTable_basic
=== CONT  TestAccVPCRouteTableDataSource_basic
--- PASS: TestAccVPCRouteTable_basic (18.54s)
--- PASS: TestAccVPCRouteTableDataSource_basic (19.07s)
--- PASS: TestAccVPCDefaultRouteTable_basic (24.14s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        27.367s

@ewbankkit ewbankkit merged commit d3c4505 into main Apr 6, 2023
@ewbankkit ewbankkit deleted the r/aws_route_table-ignore-VpcLattice-routes branch April 6, 2023 19:40
@github-actions github-actions bot added this to the v4.62.0 milestone Apr 6, 2023
github-actions bot pushed a commit that referenced this pull request Apr 6, 2023
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This functionality has been released in v4.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!

@github-actions
Copy link

github-actions bot commented May 9, 2023

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 May 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/vpc Issues and PRs that pertain to the vpc service. size/XS Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants