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() { 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"

View File

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