Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Don't create final DB snapshot when destroying Amazon RDS instance #243

Closed
wants to merge 1 commit into from

Conversation

AWSmith0216
Copy link

While using viya4-iac-aws to provision an Amazon RDS instance, I noticed that a database snapshot is created when doing a 'terraform destroy'. The user doesn't really have any way to know that this snapshot is created, and it will persist indefinitely until the user manual deletes it. Personally, when doing a 'terraform destroy', I would expect all resources to be removed, or at least some indication that something is being left behind.

It looks like the rds module provides a skip_final_snapshot flag which can be used to control this behavior. This PR simply sets this flag to true by default rather than false.

@dhoucgitter
Copy link
Member

@AWSmith0216, thanks for the PR suggestion. I noticed that behavior cleaning up some AWS resources recently and discussed some options with Thomas. We had decided to expose the skip_final_snapshot as an optional configuration parameter but default it to true instead of false since that is the current behavior and we anticipate that production environments may still want that db snapshot insurance. That would still allow folks to override it to false to prevent automatic db snapshot generation. Does that seem like a reasonable compromise?

@AWSmith0216
Copy link
Author

@dhoucgitter , providing a configuration parameter to control the snapshot behavior works for me. Thanks

@dhoucgitter
Copy link
Member

Created internal ticket IAC-1241 to provide this feature.

@dhoucgitter
Copy link
Member

@AWSmith0216, thanks for submitting this PR and sharing your proposed changes with the team.
Closing this PR for housekeeping reasons since we will be opening a separate PR for the changes made under IAC-1241.

@dhoucgitter dhoucgitter closed this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants