1
0
Fork 0

variables map

This commit is contained in:
Cedric Girard 2020-05-12 11:49:29 +02:00
parent c408ff1baf
commit ec14136179
Signed by: X-dark
GPG key ID: E7D0E125DB9519E4
3 changed files with 19 additions and 4 deletions

View file

@ -6,6 +6,14 @@ variable "c" {
type = list type = list
default = ["foo", "bar", "baz"] default = ["foo", "bar", "baz"]
} }
variable "d" {
type = map
default = {
"foo" = "bar"
"aze" = "rty"
"qsd" = "fgh"
}
}
output "ov1" { output "ov1" {
value = "${var.a}" value = "${var.a}"
@ -16,3 +24,6 @@ output "ov2" {
output "ov3" { output "ov3" {
value = "${var.c[2]}" value = "${var.c[2]}"
} }
output "ov4" {
value = "${var.d.foo}"
}

View file

@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "0.12.24", "terraform_version": "0.12.24",
"serial": 8, "serial": 9,
"lineage": "53b98038-185e-af43-6c6c-521354912695", "lineage": "53b98038-185e-af43-6c6c-521354912695",
"outputs": { "outputs": {
"ov1": { "ov1": {
@ -13,7 +13,11 @@
"type": "string" "type": "string"
}, },
"ov3": { "ov3": {
"value": "fgh", "value": "baz",
"type": "string"
},
"ov4": {
"value": "bar",
"type": "string" "type": "string"
} }
}, },

View file

@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "0.12.24", "terraform_version": "0.12.24",
"serial": 7, "serial": 8,
"lineage": "53b98038-185e-af43-6c6c-521354912695", "lineage": "53b98038-185e-af43-6c6c-521354912695",
"outputs": { "outputs": {
"ov1": { "ov1": {
@ -13,7 +13,7 @@
"type": "string" "type": "string"
}, },
"ov3": { "ov3": {
"value": "baz", "value": "fgh",
"type": "string" "type": "string"
} }
}, },