mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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:
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…
Reference in New Issue
Block a user