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

✨ #42 Add support for provisioning only a single NAT Gateway #58

Conversation

n8io
Copy link
Contributor

@n8io n8io commented Jul 23, 2017

DEPENDENT ON PR #57 (merged)

Sample setup:

  • You have 2 public subnets
  • You have 2 private subnets

Scenario 1 (high availability)

Prior to this change when you set enable_nat_gateway=true you would get the following infrastructure:

  • 2 EIPs (1 per private subnet)
  • 2 NAT Gateway (1 per private subnet)

While this follows high availability best practices and should be your configuration in a production, sometimes you don't want to incur the cost of having multiple NAT gateways in your dev and testing environments.

Scenario 2 (low availability)

After this change when you set enable_nat_gateway=true and single_nat_gateway=true you would get the following infrastructure:

  • 1 EIP (1 total)
  • 1 NAT Gateway (1 total)

Meaning that you share a single EIP/NAT gateway pairing across all of your private subnets. Reducing costs while maintaining functionality but being far less available. This leaves the onus on the person terraforming to decide whether or not they are ok with the cost/risk tradeoff.

Again, this scenario is not intended for a production environment.

n8io and others added 2 commits July 23, 2017 09:09
@n8io n8io changed the title ✨ #42 Add support for provisioning only a single NAT Gateway [WIP] ✨ #42 Add support for provisioning only a single NAT Gateway Jul 23, 2017
@n8io n8io changed the title [WIP] ✨ #42 Add support for provisioning only a single NAT Gateway [DEPENDS ON #57] ✨ #42 Add support for provisioning only a single NAT Gateway Jul 23, 2017
@tfhartmann
Copy link
Member

You may want to update the README to clarify what these parameters do, too.

@n8io n8io force-pushed the feature/allow-single-nat-gateway branch from ed802eb to 4c86823 Compare July 24, 2017 23:33
@n8io
Copy link
Contributor Author

n8io commented Jul 24, 2017

@tfhartmann Good catch. Done.

@n8io n8io changed the title [DEPENDS ON #57] ✨ #42 Add support for provisioning only a single NAT Gateway ✨ #42 Add support for provisioning only a single NAT Gateway Aug 1, 2017
@n8io
Copy link
Contributor Author

n8io commented Aug 1, 2017

@antonbabenko this PR is ready for review/merge.

@antonbabenko
Copy link
Member

The code looks good to me. I will merge it and tag a release, but unfortunately I won't be able to test it myself in the nearest future. If there are any issues with this module - open an issue (cc: all).

@antonbabenko antonbabenko merged commit 7a735de into terraform-community-modules:master Aug 2, 2017
@antonbabenko
Copy link
Member

New release tag is v1.0.11.

@n8io Thank you for the work and sorry for being so slow this time :)

@n8io
Copy link
Contributor Author

n8io commented Aug 3, 2017

No worries @antonbabenko. Thank you for all the great work leading up to this.

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.

None yet

3 participants