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

fix: The number of intra subnets should not influence the number of NAT gateways provisioned #968

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

samul69
Copy link
Contributor

@samul69 samul69 commented Aug 2, 2023

Description

"The module does not take into account the number of intra_subnets, since the latter are designed to have no Internet access via NAT Gateway."
the concept is right, the number of intra subnets should not determine the number of nat gateways. However it currently does. Today I tried to create a vpc with :
3 intra subnets,
2 public subnets,
2 private subnets.
As a result, I had 3 nat gateways (because i choose configuration nat gateway per subnet) so i had:
nat-gateway-a located in public network A
nat-gateway-b located in public network B
nat-gateway-c located in public network A (second nat gateway in the same subnet).

Motivation and Context

makes the module work in accordance with the assumptions, documentation and logic. Keeping an unnecessary nat gateway with a public ip is just an extra cost, and 2 nat gateways in the same subnet can be confusing

Breaking Changes

No

How Has This Been Tested?

Yeap, on latest version 5.1.1 i removed line and everything works fine according to assumptions.

"The module does not take into account the number of intra_subnets, since the latter are designed to have no Internet access via NAT Gateway."
@samul69 samul69 changed the title intra subnets shouldn't determine number of nat gateways fix: intra subnets shouldn't determine number of nat gateways Aug 2, 2023
@tndavaloz
Copy link

This seems to be an issue on my end as well, @antonbabenko, any way we could get eyes on this by chance?

@bryantbiggs bryantbiggs changed the title fix: intra subnets shouldn't determine number of nat gateways fix: The number of intra subnets should not influence the number of NAT gateways provisioned Sep 7, 2023
@bryantbiggs bryantbiggs merged commit 1e36f9f into terraform-aws-modules:master Sep 7, 2023
19 of 21 checks passed
antonbabenko pushed a commit that referenced this pull request Sep 7, 2023
### [5.1.2](v5.1.1...v5.1.2) (2023-09-07)

### Bug Fixes

* The number of intra subnets should not influence the number of NAT gateways provisioned ([#968](#968)) ([1e36f9f](1e36f9f))
@antonbabenko
Copy link
Member

This PR is included in version 5.1.2 🎉

@github-actions
Copy link

github-actions bot commented Oct 8, 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 Oct 8, 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.

4 participants