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: Optionally update VPC Route Tables for attached VPCs #35

Merged
merged 5 commits into from
May 24, 2021
Merged

feat: Optionally update VPC Route Tables for attached VPCs #35

merged 5 commits into from
May 24, 2021

Conversation

jmcorallo
Copy link
Contributor

Description

When attaching a VPC to a Transit Gateway, you also need to update the VPC's Route Table(s) to direct traffic to the TGW. Currently this needs to be done outside of the module. With this change it is now possible to provide 2 extra values on the vpc_attachments object.

For example:

vpc_attachments = {
  some_vpc = {
    ... other values

    # optional new values
    vpc_route_table_ids  = module.some_vpc.private_route_table_ids # using https://github.com/terraform-aws-modules/terraform-aws-vpc
    tgw_destination_cidr = "0.0.0.0/0"
  }
}

Motivation and Context

Motivation: currently we are using this module and additionally defining our routes outside the module.
There's also this issue open: #17

Breaking Changes

If you have defined routes outside the module you cannot redefine them with these new parameters (you need to move them with terraform state mv or delete and recreate them).
Since the new parameters are optional there is no breaking change.

How Has This Been Tested?

In own environment, with and without the new values.

@tfhartmann tfhartmann self-requested a review May 14, 2021 13:52
@tfhartmann
Copy link
Collaborator

@jmcorallo would you mind rebasing this against master to update your branch?

@jmcorallo
Copy link
Contributor Author

@tfhartmann ready

Copy link
Collaborator

@tfhartmann tfhartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks for rebasing!

@antonbabenko antonbabenko merged commit 4719da3 into terraform-aws-modules:master May 24, 2021
@antonbabenko
Copy link
Member

v2.4.0 has been just released.

PS: @tfhartmann Could you please update the example code (in the examples folder) to show this and all other features which will be added into this module in action. Without examples, we will simply forget about this one. If updating example is not feasible, please make a note in README about this, at least.

Thank you!

@github-actions
Copy link

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 Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants