From 981c6f2a5e51a0778a1481bd464542cbf16b3584 Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Fri, 7 Jun 2024 14:10:35 -0600 Subject: [PATCH] fix: add missing settings and settings reference --- pkg/config/config.go | 2 +- pkg/config/config_test.go | 2 +- resources/cloudformation-stack.go | 3 +++ resources/rds-instances.go | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index ba291dc1..88452dee 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -151,7 +151,7 @@ func (c *Config) ResolveDeprecatedFeatureFlags() { }) } if c.FeatureFlags.DisableDeletionProtection.CloudformationStack { - c.Settings.Set("CloudformationStack", &settings.Setting{ + c.Settings.Set("CloudFormationStack", &settings.Setting{ "DisableDeletionProtection": true, }) } diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index d74bf968..26ae03df 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -370,7 +370,7 @@ func TestConfig_DeprecatedFeatureFlags(t *testing.T) { assert.NotNil(t, rdsInstanceSettings) assert.Equal(t, true, rdsInstanceSettings.Get("DisableDeletionProtection")) - cloudformationStackSettings := c.Settings.Get("CloudformationStack") + cloudformationStackSettings := c.Settings.Get("CloudFormationStack") assert.NotNil(t, cloudformationStackSettings) assert.Equal(t, true, cloudformationStackSettings.Get("DisableDeletionProtection")) } diff --git a/resources/cloudformation-stack.go b/resources/cloudformation-stack.go index 9ada8966..73b7d4a9 100644 --- a/resources/cloudformation-stack.go +++ b/resources/cloudformation-stack.go @@ -32,6 +32,9 @@ func init() { Name: CloudFormationStackResource, Scope: nuke.Account, Lister: &CloudFormationStackLister{}, + Settings: []string{ + "DisableDeletionProtection", + }, }) } diff --git a/resources/rds-instances.go b/resources/rds-instances.go index 7f37d693..a1fa2e3c 100644 --- a/resources/rds-instances.go +++ b/resources/rds-instances.go @@ -22,6 +22,9 @@ func init() { Name: RDSInstanceResource, Scope: nuke.Account, Lister: &RDSInstanceLister{}, + Settings: []string{ + "DisableDeletionProtection", + }, }) }