core: TestContext2Validate_interpolateMap

This commit is contained in:
James Bardin 2018-06-01 14:06:25 -04:00 committed by Martin Atkins
parent 71cedf19a4
commit 711f305dce
2 changed files with 7 additions and 5 deletions

View File

@ -2,6 +2,7 @@ module "mod" {
source = "./mod"
}
resource "template_file" "root_template" {
template = "ext: ${module.mod.base_config["base_template"]}"
resource "template_instance" "root_template" {
compute_value = "ext: ${module.mod.base_config["base_template"]}"
compute = "value"
}

View File

@ -1,10 +1,11 @@
resource "template_file" "example" {
template = "template text"
resource "template_instance" "example" {
compute_value = "template text"
compute = "value"
}
output "base_config" {
value = {
base_template = "${template_file.example.rendered}"
base_template = "${template_instance.example.value}"
# without this we fail with no entries
extra = "value"