terraform-community-modules / tf_aws_vpc

[DEPRECATED] Use https://github.com/terraform-aws-modules/terraform-aws-vpc
Other
211 stars 203 forks source link

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

Closed n8io closed 7 years ago

n8io commented 7 years ago

~DEPENDENT ON PR #57~ (merged)

Sample setup:

Scenario 1 (high availability)

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

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:

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.

tfhartmann commented 7 years ago

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

n8io commented 7 years ago

@tfhartmann Good catch. Done.

n8io commented 7 years ago

@antonbabenko this PR is ready for review/merge.

antonbabenko commented 7 years ago

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 commented 7 years ago

New release tag is v1.0.11.

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

n8io commented 7 years ago

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