mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #14088 from hashicorp/jbardin/hook-nil-diff
it's possible to get a nil diff in PreApply
This commit is contained in:
commit
15704cc6ee
@ -42,6 +42,10 @@ func (h *CountHook) PreApply(
|
|||||||
h.Lock()
|
h.Lock()
|
||||||
defer h.Unlock()
|
defer h.Unlock()
|
||||||
|
|
||||||
|
if d.Empty() {
|
||||||
|
return terraform.HookActionContinue, nil
|
||||||
|
}
|
||||||
|
|
||||||
if h.pending == nil {
|
if h.pending == nil {
|
||||||
h.pending = make(map[string]countHookAction)
|
h.pending = make(map[string]countHookAction)
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,11 @@ func (h *UiHook) PreApply(
|
|||||||
d *terraform.InstanceDiff) (terraform.HookAction, error) {
|
d *terraform.InstanceDiff) (terraform.HookAction, error) {
|
||||||
h.once.Do(h.init)
|
h.once.Do(h.init)
|
||||||
|
|
||||||
|
// if there's no diff, there's nothing to output
|
||||||
|
if d.Empty() {
|
||||||
|
return terraform.HookActionContinue, nil
|
||||||
|
}
|
||||||
|
|
||||||
id := n.HumanId()
|
id := n.HumanId()
|
||||||
|
|
||||||
op := uiResourceModify
|
op := uiResourceModify
|
||||||
|
Loading…
Reference in New Issue
Block a user