Skip to content

Instantly share code, notes, and snippets.

@DeviaVir
Last active January 25, 2018 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeviaVir/4360d4189a10882a13bd95381e2b79b7 to your computer and use it in GitHub Desktop.
Save DeviaVir/4360d4189a10882a13bd95381e2b79b7 to your computer and use it in GitHub Desktop.
terraform dots in var names?
{
"data": {
"terraform_remote_state": {
"networking-int": {
"backend": "gcs",
"config": {
"bucket": "networking-int",
"path": "terraform.tfstate",
"region": "us-east1",
"project": "networking-int"
}
}
}
},
"output": {
"Bucket[networking-test-bucket].self_link": {
"value": "${data.terraform_remote_state.networking-int.Bucket[networking-test-bucket].self_link}", // nope
"value": "${data.terraform_remote_state.networking-int[Bucket[networking-test-bucket].self_link]}", // nope
"value": "${data.terraform_remote_state.networking-int[\"Bucket[networking-test-bucket].self_link\"]}", // also nope
"value": "${data.terraform_remote_state.networking-int.[\"Bucket[networking-test-bucket].self_link\"]}", // nope
"value": "${data.terraform_remote_state.networking-int.\"Bucket[networking-test-bucket].self_link\"}", // nope
"value": "${element(data.terraform_remote_state.networking-int.*, index(data.terraform_remote_state.networking-int.*, \"Bucket[networking-test-bucket].self_link\"))}", //nope
"value": "${lookup(data.terraform_remote_state.networking-int.Bucket, \"Bucket[networking-test-bucket].self_link\")}" //nope
}
}
}
[...]
"output": {
"Bucket[networking-test-bucket].self_link": {
"value": "${google_storage_bucket.networking-test-bucket.self_link}"
},
"Bucket[networking-test-bucket].url": {
"value": "${google_storage_bucket.networking-test-bucket.url}"
}
},
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment