在运行terraform destroy
时出现错误,我的输出是template_file
资源的结果,该资源的内容取决于被销毁的资源。
data "template_file" "ansible_inventory" {
template = "${ ...interpolated string that uses values from the ec2 resources in the next line (e.g. ip addresses etc)... }"
depends_on = [ ...list of ec2 resources... ]
}
output "ansible_inventory" {
value = "${data.template_file.ansible_inventory.rendered}"
}
当我进行销毁时,出现错误:
Resource 'data.template_file.ansible_inventory' does not have attribute 'rendered' for variable 'data.template_file.ansible_inventory.rendered'
是否有解决方法?这似乎与此处报告的问题相同:Resource 'data.template_file.user_data' does not have attribute 'rendered'