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

Support aws_availability_zones #37

Closed
analytically opened this issue Mar 8, 2017 · 2 comments
Closed

Support aws_availability_zones #37

analytically opened this issue Mar 8, 2017 · 2 comments

Comments

@analytically
Copy link

See hashicorp/terraform#11482

data "aws_availability_zones" "available" {}

resource "aws_subnet" "public" {
  count = "${length(data.aws_availability_zones.available.id)}"
  availability_zone = "${data.aws_availability_zones.available.id[count.index]}"
}
@nyambati
Copy link
Contributor

nyambati commented Mar 9, 2017

@analytically I think you can still use the module as is with aws_availability_zones. This module requires a list of azs to create subnets. You can supply that list to the module, here is an example.

module "vpc" {
...
  azs                = ["${data.aws_availability_zones.available.names}"]
...
}

I think the current setup makes the module more flexible providing more control on how many subnets you would like to create.

@analytically
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants