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

Add a simple way to just use all AZs #36

Closed
lvh opened this issue Oct 18, 2018 · 4 comments
Closed

Add a simple way to just use all AZs #36

lvh opened this issue Oct 18, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@lvh
Copy link

lvh commented Oct 18, 2018

The existence of length(data.aws_availability_zones.available.names) implies that something already knows what "all AZs" or "n AZs" should look like; but I still have to specify an explicit list.

@osterman
Copy link
Member

osterman commented Oct 18, 2018

We used always just create subnets in all AZs, but there are some implications with this:

  1. If using private subnets with NAT gateways, cost goes up signficiantly since each AZ gets it's own gateway. This is required for true HA.
  2. Some regions have a lot of AZs - I think up to 7. Amazon takes AZs out of commission. When that happens, the subnet calculations change which causes a destructive rebuild of the entire environment. This is not usually desirable and terraform is not good at handling situations where a list of values changes. It always wants to destroy and recreate.
  3. Operating in a lot of AZs increases latencies and inter-zone data transfer costs if there's a lot of chatter between instances. If there are fewer AZs, it's easier to ensure more intrazone routing.
  4. Historically, it used to be that you had to purchase RIs in an AZ, so having more AZs made it more difficult to forecast where to buy RIs. I don't think this is the case anymore.

@osterman
Copy link
Member

The existence of length(data.aws_availability_zones.available.names) implies that something already knows what "all AZs" or "n AZs" should look like

The reason we have the data provider right now is so we can calculate subnets based on the theoretical max so that a user can add remove subnets without it affecting the subnet calculation, which causes terraform to want to rebuild.

@osterman osterman added the enhancement New feature or request label Oct 18, 2018
@osterman osterman added this to Ready to Implement in Open Source Community Support via automation Oct 18, 2018
@Jamie-BitFlight Jamie-BitFlight mentioned this issue Jun 3, 2019
@Jamie-BitFlight
Copy link
Contributor

This PR addresses both scenarios. Allowing for max subnets to be set. Or a number of public/private subnets to be set. To specify a list of named az's or just go with the full list of az's.

Open Source Community Support automation moved this from Ready to Implement to Completed Feb 21, 2022
@nitrocode
Copy link
Member

Closed because of the previously merged PR #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

4 participants