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

Read replica deletion protection #155

Merged

Conversation

WillRemesh
Copy link
Contributor

This PR adds a variable to manage read replica deletion protection.

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need a separate variable for replicas?

@WillRemesh
Copy link
Contributor Author

I thought it would be helpful, usually replicas aren't as important to keep up. Could set read_replica_deletion_protection to false always, then only change deletion_protection when changing the default db. I'm open to using the existing variable or setting to false always, just let me know the preference and I can make the change. Currently can't bring down replicas with TF so this is blocking for us.

@morgante
Copy link
Contributor

morgante commented Nov 3, 2020

Got it, that's fine. Can you please get tests passing, as per the contributing guide?

@WillRemesh
Copy link
Contributor Author

@morgante Tests are now passing, sorry this took so long, had to fix things from previous merged PR's.

variable "read_replica_deletion_protection" {
description = "Used to block Terraform from deleting replica SQL Instances."
type = bool
default = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this should be false by default? Deleting read replicas isn't as dangerous as deleting the primary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, also removed read_replica_deletion_protection = false from the examples

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@morgante morgante merged commit 9e22cfd into terraform-google-modules:master Nov 11, 2020
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.

None yet

2 participants