it's safe for destroy provisioners to access path
The path values are statically loaded, and do not create any dependencies that could cause problems with destroy provisioners.
This commit is contained in:
parent
726a74ef65
commit
c376905adc
|
@ -127,7 +127,7 @@ func onlySelfRefs(body hcl.Body) hcl.Diagnostics {
|
||||||
for _, v := range attr.Expr.Variables() {
|
for _, v := range attr.Expr.Variables() {
|
||||||
valid := false
|
valid := false
|
||||||
switch v.RootName() {
|
switch v.RootName() {
|
||||||
case "self":
|
case "self", "path":
|
||||||
valid = true
|
valid = true
|
||||||
case "count":
|
case "count":
|
||||||
// count must use "index"
|
// count must use "index"
|
||||||
|
|
|
@ -12,7 +12,7 @@ resource "null_resource" "a" {
|
||||||
when = destroy
|
when = destroy
|
||||||
index = count.index
|
index = count.index
|
||||||
key = each.key
|
key = each.key
|
||||||
|
dir = path.module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue