diff --git a/configs/provisioner.go b/configs/provisioner.go index bbc6de993..9dee6e881 100644 --- a/configs/provisioner.go +++ b/configs/provisioner.go @@ -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" diff --git a/configs/testdata/warning-files/destroy-provisioners.tf b/configs/testdata/warning-files/destroy-provisioners.tf index ff950bc7f..96d8aafb5 100644 --- a/configs/testdata/warning-files/destroy-provisioners.tf +++ b/configs/testdata/warning-files/destroy-provisioners.tf @@ -12,7 +12,7 @@ resource "null_resource" "a" { when = destroy index = count.index key = each.key - + dir = path.module } }