From 29df4ced9e0d44b82eacd2e79d60979f545bdd64 Mon Sep 17 00:00:00 2001 From: Ilia Gogotchuri Date: Wed, 3 Dec 2025 13:34:28 +0400 Subject: [PATCH] Dio's comments Signed-off-by: Ilia Gogotchuri --- internal/configs/module_merge.go | 2 +- internal/tofu/skip_destroy_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/configs/module_merge.go b/internal/configs/module_merge.go index 489720fed2..1c8565471c 100644 --- a/internal/configs/module_merge.go +++ b/internal/configs/module_merge.go @@ -266,7 +266,7 @@ func (r *Resource) merge(or *Resource, rps map[string]*RequiredProvider) hcl.Dia r.Managed.PreventDestroy = or.Managed.PreventDestroy } - if r.Managed.Destroy != nil { + if or.Managed.Destroy != nil { r.Managed.Destroy = or.Managed.Destroy } diff --git a/internal/tofu/skip_destroy_test.go b/internal/tofu/skip_destroy_test.go index af2bceb7ed..e59709bdc0 100644 --- a/internal/tofu/skip_destroy_test.go +++ b/internal/tofu/skip_destroy_test.go @@ -625,7 +625,7 @@ func TestSkipDestroy_Deposed(t *testing.T) { }, { // Orphaned deposed instance (no config) with SkipDestroy=false should be deleted. - name: "Orphaned_Forget", + name: "Orphaned_Delete", config: ` # Empty, use this for any test that requires a module but no config. `,