【发布时间】:2016-10-19 15:57:17
【问题描述】:
在 terraform 文档中,它展示了如何使用模板。有什么方法可以将这个渲染输出记录到控制台?
https://www.terraform.io/docs/configuration/interpolation.html#templates
data "template_file" "example" {
template = "${hello} ${world}!"
vars {
hello = "goodnight"
world = "moon"
}
}
output "rendered" {
value = "${template_file.example.rendered}"
}
【问题讨论】:
-
如果您不需要输出变量,您也可以只使用
terraform state show template_file.example,它将打印所有数据源的属性,包括rendered
标签: terraform