Closed deniscoady closed 1 year ago
Currently it has a default value of
variable "availability_zone" {
description = "The AWS AZ to deploy the infrastructure on"
default = ["us-west-2a"]
type = list(string)
}
It can be changed to other values.
I'm leaning toward nulling it by default because people don't really care about the AZ their instance is in in most cases, and if they do care then they'll want to set it themselves rather than use the default. Thanks for the issue!
Hey @gene-redpanda I also attempted to manually specify the AZ but got an error.
(base) deniscoady@MacBook-Pro aws % terraform apply -var="aws_region=us-east-2" -var="vpc_id=vpc-01832e9d82c782393" -var="subnet_id=subnet-085ca0e2cc01adcc1" -var="availability_zone=us-east-2"
╷
│ Error: Variables not allowed
│
│ on <value for var.availability_zone> line 1:
│ (source code not available)
│
│ Variables may not be used here.
╵
Has to be specified as a list, not an individual item!
Gotcha. I did the following and it worked.
-var='availability_zone=["us-east-2a"]'
Attempting to create a cluster outside of AWS us-west-2 gives me an error with Terraform still attempting to create availability zones in us-west-2.