【发布时间】:2020-07-28 18:07:07
【问题描述】:
我得到了 terraform 0.11.11。 图中显示说话的资源在根模块中
$ terraform graph
digraph {
compound = "true"
newrank = "true"
subgraph "root" {
"[root] data.template_file.default" [label = "data.template_file.default", shape = "box"]
"[root] data.template_file.etcd" [label =
...
"[root] null_resource.service_resolv_conf" [label = "null_resource.service_resolv_conf", shape = "box"]
...
但试图玷污它说它不是:
$ terraform taint null_resource.service_resolv_conf
The resource null_resource.service_resolv_conf couldn't be found in the module root.
更新
$ terraform state list|grep resolv_conf
null_resource.service_resolv_conf[0]
null_resource.service_resolv_conf[1]
然后我尝试了:
$ terraform taint null_resource.service_resolv_conf[0]
The resource null_resource.service_resolv_conf[0] couldn't be found in the module root.
和
$ terraform taint null_resource.service_resolv_conf
The resource null_resource.service_resolv_conf couldn't be found in the module root.
【问题讨论】:
-
如果代码在模块中,请尝试' terraform taint -module=name null_resource.name
-
@victorm 这个 ^ 是正确的答案。非常感谢!
标签: terraform