-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Fix #117 - Add one_nat_gateway_per_az
functionality
#129
Fix #117 - Add one_nat_gateway_per_az
functionality
#129
Conversation
@antonbabenko I imagine there will be documentation changes, so just let me know what you want updated. |
Thanks Scott! PR looks pretty elegant. I will try to review it during Monday-Tuesday. |
I spent 20 minutes to try to break it and I have failed :) Good work! Few questions before merge:
|
For item 1: Yes, I will do that. Since this feature is a bit different, probably having something in the README.md makes sense. For item 2: I wouldn't be opposed to it. When I specified If we set
I could help with some of the testing in those stale PRs as well if you need. |
Good docs. Let's set After that, it would be great if you can follow up and verify issues&PRs you listed so we get some of them merged and publish releases as usual. |
@antonbabenko Check out the latest commit 73e96af. It has some of the consequences of setting that to be Notable, if Does the column "required" in the README mean always required? Technically those two aren't always required, but if |
Right, then let's leave it |
@antonbabenko Reverted back. Should be good to go! |
v1.32.0 has been released. |
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. |
Description
Fixes #117 by adding a new variable called
one_nat_gateway_per_az
. This enables the feature that only one NAT gateway is created for each availability zone. By default, the number of NAT Gateways created is equal tomax_subnet_length
, which is calculated as followsFor example, if a user specified three database subnet CIDR blocks, four ElastiCache subnet CIDR blocks, and five private subnet CIDR blocks, then five NAT Gateways would be created since five is the maximum of those lists.
Motivation and Context
As per #117, the initial thought was that the default behavior of creating
max_subnet_length
number of NAT Gateways was a bit overkill considering that:However, as @antonbabenko suggested in the issue (#117 (comment)), multiple scenarios should be supported.
How Has This Been Tested?
Ran
terraform apply
on the following modification of the Complete VPC example code:It is confirmed that the number of NAT gateways (
5
since the AZ count is 5) created does not exceed the8
number of private subnet CIDR blocks specified inprivate_subnets
.Types of changes
Checklist: