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

feat: Allow specifying additional TGW routes in attached VPCs #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

partcyborg
Copy link

Description

Adds parameter tgw_additional_vpc_cidrs to the vpc_attachments map that enables adding additional aws_route resources that send traffic across the TGW VPC attachment.

Changes the name of the existing aws_route resource from this since there are now more than one in the state file.

Motivation and Context

In our environment we have two CIDR blocks that need to transit from the VPC across the TGW network: 10.0.0.0/8 and 172.16.0.0/12. Unfortunately this is not possible to do with the module as it is today.

With this change we can add aws_route entries for both CIDR blocks to our VPC route tables.

Breaking Changes

This change increments the minimum required terraform version to 1.1 in order to take advantage of moved blocks.

In order to implement this I had to add a second aws_route resource because the existing one is keyed only on route table ID which is no longer a unique value for route resources.

Commonly accepted Terraform style rules indicate that this is only an acceptable resource name if it is the only one of its type in a module. Since there are now two aws_route resources, I changed the name of the existing this resource to destination_cidr so that this style rule is still valid.

While I personally feel that the overwhelming majority of module users should already be using a version equal to or greater than Terraform 1.1, if bumping this requirement is undesirable I would fine with reverting the resource rename and leaving the minimum required version as is.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Adds parameter `tgw_additional_vpc_cidrs` to the `vpc_attachments` map that enables adding additional `aws_route` resources that send traffic across the TGW peering connection.

Changes the name of the existing `aws_route` resource from `this` since there are now more than one in the state file.
@partcyborg
Copy link
Author

NOTE: this change has the same bootstrapping problem as #111, but it works correctly when the VPC resources are configured ahead of time (or in a separate state file as we do in our terraform)

@elopsod
Copy link

elopsod commented Jul 24, 2024

Hi @antonbabenko could you please take a look
Thank you!

@matkovskiy
Copy link

Good morning.
@antonbabenko Could you take a look at that?
I am also waiting for this functionality

Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Sep 13, 2024
@elkh510
Copy link

elkh510 commented Sep 13, 2024

Hi @antonbabenko could you please take a look
Thank you!

@github-actions github-actions bot removed the stale label Sep 14, 2024
Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Oct 14, 2024
@elkh510
Copy link

elkh510 commented Oct 14, 2024

Hi
Still actually

@github-actions github-actions bot removed the stale label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants