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.
pull/23862/head
James Bardin 6 years ago
parent 726a74ef65
commit c376905adc

@ -127,7 +127,7 @@ func onlySelfRefs(body hcl.Body) hcl.Diagnostics {
for _, v := range attr.Expr.Variables() {
valid := false
switch v.RootName() {
case "self":
case "self", "path":
valid = true
case "count":
// count must use "index"

@ -12,7 +12,7 @@ resource "null_resource" "a" {
when = destroy
index = count.index
key = each.key
dir = path.module
}
}

Loading…
Cancel
Save