diff --git a/configs/provisioner.go b/configs/provisioner.go index bbc6de993..6f380860a 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", "terraform": 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..c6c28b823 100644 --- a/configs/testdata/warning-files/destroy-provisioners.tf +++ b/configs/testdata/warning-files/destroy-provisioners.tf @@ -13,6 +13,10 @@ resource "null_resource" "a" { index = count.index key = each.key + // path and terraform values are static, and do not create any + // dependencies. + dir = path.module + workspace = terraform.workspace } }