1
0
Fork 0

list in variable

This commit is contained in:
Cedric Girard 2020-05-12 11:36:42 +02:00
parent b86c5c4022
commit c408ff1baf
Signed by: X-dark
GPG key ID: E7D0E125DB9519E4
3 changed files with 21 additions and 6 deletions

View file

@ -2,6 +2,10 @@ variable "a" {}
variable "b" {
default = "test"
}
variable "c" {
type = list
default = ["foo", "bar", "baz"]
}
output "ov1" {
value = "${var.a}"
@ -9,3 +13,6 @@ output "ov1" {
output "ov2" {
value = "${var.b}"
}
output "ov3" {
value = "${var.c[2]}"
}

View file

@ -1,15 +1,19 @@
{
"version": 4,
"terraform_version": "0.12.24",
"serial": 3,
"serial": 8,
"lineage": "53b98038-185e-af43-6c6c-521354912695",
"outputs": {
"ov1": {
"value": "qsd",
"value": "foobar",
"type": "string"
},
"ov2": {
"value": "foo",
"value": "bar",
"type": "string"
},
"ov3": {
"value": "fgh",
"type": "string"
}
},

View file

@ -1,15 +1,19 @@
{
"version": 4,
"terraform_version": "0.12.24",
"serial": 2,
"serial": 7,
"lineage": "53b98038-185e-af43-6c6c-521354912695",
"outputs": {
"ov1": {
"value": "aze",
"value": "foobar",
"type": "string"
},
"ov2": {
"value": "test",
"value": "bar",
"type": "string"
},
"ov3": {
"value": "baz",
"type": "string"
}
},