mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
Fix replace_triggered_by criteria
Only immediate changes to the resource are considered.
This commit is contained in:
parent
6670b71a2e
commit
fb6fcf783b
@ -336,7 +336,9 @@ func (ctx *BuiltinEvalContext) EvaluateReplaceTriggeredBy(expr hcl.Expression, r
|
||||
// for any change.
|
||||
if len(ref.Remaining) == 0 {
|
||||
for _, c := range changes {
|
||||
if c.ChangeSrc.Action != plans.NoOp {
|
||||
switch c.ChangeSrc.Action {
|
||||
// Only immediate changes to the resource will trigger replacement.
|
||||
case plans.Update, plans.DeleteThenCreate, plans.CreateThenDelete:
|
||||
return ref, true, diags
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user