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:
James Bardin 2020-01-13 16:44:44 -05:00
parent 726a74ef65
commit c376905adc
2 changed files with 2 additions and 2 deletions

View File

@ -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"

View File

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