Skip to content

Commit

Permalink
Merge pull request #189 from ekristen/fix-settings-refs
Browse files Browse the repository at this point in the history
fix: add missing settings and settings reference
  • Loading branch information
ekristen authored Jun 7, 2024
2 parents e12be4d + 981c6f2 commit 1097aec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
3 changes: 3 additions & 0 deletions resources/cloudformation-stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func init() {
Name: CloudFormationStackResource,
Scope: nuke.Account,
Lister: &CloudFormationStackLister{},
Settings: []string{
"DisableDeletionProtection",
},
})
}

Expand Down
3 changes: 3 additions & 0 deletions resources/rds-instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ func init() {
Name: RDSInstanceResource,
Scope: nuke.Account,
Lister: &RDSInstanceLister{},
Settings: []string{
"DisableDeletionProtection",
},
})
}

Expand Down

0 comments on commit 1097aec

Please sign in to comment.