hcl
hcl copied to clipboard
Is There a Way to Generate Anonymous Blocks with Variable References
Hi, Is there any guide on generating something like the following in go?
data = {
config.hcl = data.template_file.vault_config.rendered
}
Attempt
dataMap := map[string]cty.Value{
"config.hcl": cty.StringVal("data.template_file.vault_config.rendered"),
}
body.SetAttributeValue("data", cty.ObjectVal(dataMap))
However this generates the following (with quotes)
data = {
"config.hcl" = "data.template_file.vault_config.rendered"
}