mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
missed .% suffixes in diff.Apply
Diff.Apply checks for unneeded container count diffs, but was missing the check for maps. Add an early return for planning a destroy.
This commit is contained in:
parent
931f459336
commit
c34c37fbd5
@ -498,6 +498,12 @@ func (s *GRPCProviderServer) PlanResourceChange(_ context.Context, req *proto.Pl
|
|||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We don't usually plan destroys, but this can return early in any case.
|
||||||
|
if proposedNewStateVal.IsNull() {
|
||||||
|
resp.PlannedState = req.ProposedNewState
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
|
||||||
info := &terraform.InstanceInfo{
|
info := &terraform.InstanceInfo{
|
||||||
Type: req.TypeName,
|
Type: req.TypeName,
|
||||||
}
|
}
|
||||||
|
@ -546,7 +546,7 @@ func (d *InstanceDiff) applyBlockDiff(path []string, attrs map[string]string, sc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for empty "count" keys
|
// check for empty "count" keys
|
||||||
if strings.HasSuffix(attr, ".#") && diff.New == "0" {
|
if (strings.HasSuffix(attr, ".#") || strings.HasSuffix(attr, ".%")) && diff.New == "0" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user