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

Chapter 2 Error Availability Zones in WebServer Cluster #33

Closed
JamesAndresCM opened this issue Jul 9, 2019 · 3 comments
Closed

Chapter 2 Error Availability Zones in WebServer Cluster #33

JamesAndresCM opened this issue Jul 9, 2019 · 3 comments
Labels

Comments

@JamesAndresCM
Copy link

  • Message:
    Inappropriate value for attribute "availability_zones": element 0: string
    required.

¿ How to fix ?

  • Replace
    availability_zones = ["${data.aws_availability_zones.all.names}"]
  • To
    availability_zones = ["${data.aws_availability_zones.all.names[0]}"]
@JamesAndresCM JamesAndresCM changed the title Chapter 2 Error Availability Zones Chapter 2 Error Availability Zones in WebServer Cluster Jul 9, 2019
@brikis98
Copy link
Owner

brikis98 commented Jul 9, 2019

Are you using code form the master branch? Are you on Terraform 0.12? Are you reading the 2nd edition of the book?

@brikis98
Copy link
Owner

No response for over a year, closing.

@danielk0121
Copy link

availability_zones = data.aws_availability_zones.all.names

it works for me

terraform {
  required_version = "0.12.23"
  required_providers {
    aws = ">= 2.53.0"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants