Terraform: assigning `data.aws_availability_zones.names` to availability_zones

Created on 19 Feb 2017  ยท  2Comments  ยท  Source: hashicorp/terraform

I could not be sure but I would like to share my situation.

aws_availability_zones.names is a list according to [documentation]. But I can not assign into aws_elb.availability_zones

data "aws_availability_zones" "available" {}

resource "aws_elb" "elb" {
  availability_zones = "${data.aws_availability_zones.available.names}"
  ////
}

Is this a bug?

Most helpful comment

seems bracket are required but I did not understand why it is required.

availability_zones = ["${data.aws_availability_zones.available.names}"]

All 2 comments

seems bracket are required but I did not understand why it is required.

availability_zones = ["${data.aws_availability_zones.available.names}"]

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings