Skip to content

feat: Make the enable_nat_gateway and single_nat_gateway variables configurable #343

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

Merged
merged 2 commits into from
May 12, 2023

Conversation

chtakahashi
Copy link
Contributor

Description

Our team recently received an email from AWS recommending the utilization of separate NAT Gateways per AZ, and we tracked down the VPC / NAT Gateway combinations to be coming from our usage of the atlantis module.
This PR adds variables to configure the arguments enable_nat_gateway and single_nat_gateway to the terraform-aws-modules/vpc/aws submodule.

Motivation and Context

This change is in direct response to the following message we received from AWS, via e-mail:

We have observed that your Amazon VPC resources are using a shared NAT Gateway across multiple Availability Zones (AZ). To ensure high availability and minimize inter-AZ data transfer costs, we recommend utilizing separate NAT Gateways in each AZ and routing traffic locally within the same AZ.

Each NAT Gateway operates within a designated AZ and is built with redundancy in that zone only. As a result, if the NAT Gateway or AZ experiences failure, resources utilizing that NAT Gateway in other AZ(s) also get impacted. Additionally, routing traffic from one AZ to a NAT Gateway in a different AZ incurs additional inter-AZ data transfer charges. We recommend choosing a maintenance window for architecture changes in your Amazon VPC.

Breaking Changes

No changes. All new variables are optional, and I set the newly added variables to default to the same initial values as before.

How Has This Been Tested?

We are using this in our own AWS environment.

@chtakahashi chtakahashi changed the title Make the enable_nat_gateway and single_nat_gateway variables configurable [feat] Make the enable_nat_gateway and single_nat_gateway variables configurable May 4, 2023
@chtakahashi chtakahashi changed the title [feat] Make the enable_nat_gateway and single_nat_gateway variables configurable feat: Make the enable_nat_gateway and single_nat_gateway variables configurable May 4, 2023
@chtakahashi
Copy link
Contributor Author

Noted the pre-commit / min tf pre-commit is failing due to incompatible versions - this was unrelated to the changes I made. Looking for guidance on how to proceed here! 😃

@bryantbiggs bryantbiggs merged commit 375a926 into terraform-aws-modules:master May 12, 2023
antonbabenko pushed a commit that referenced this pull request May 12, 2023
## [3.28.0](v3.27.0...v3.28.0) (2023-05-12)

### Features

* Make the enable_nat_gateway and single_nat_gateway variables configurable ([#343](#343)) ([375a926](375a926))
@antonbabenko
Copy link
Member

This PR is included in version 3.28.0 🎉

@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 Jun 12, 2023
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