'how to convert variable.tf into tfvars. Terraform
How can I convert this variable into tfvars variable?
variable "users" {
type = list
default = [
[
"user1",
"user1display",
"password119823"
],
[
"user2",
"user2display",
"password119823"
]
]
}
When I do following:
terraform.tfvars
users = [
[
"user1",
"user1display",
"password119823"
],
[
"user2",
"user2display",
"password119823"]
]
Terraform is asking me for add value for users.
Thank you.
Solution 1:[1]
As this is written here
A variable definitions file uses the same basic syntax as Terraform language files, but consists only of variable name assignments:
with such example:
image_id = "ami-abc123"
availability_zone_names = [
"us-east-1a",
"us-west-1c",
]
Could you remove emtpy line a try again:
users = [
[
"user1",
"user1display",
"password119823"
],
[
"user2",
"user2display",
"password119823"]
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Krzysztof Madej |
