-
Notifications
You must be signed in to change notification settings - Fork 411
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
Read replica deletion protection #155
Conversation
…ead replica db instances.
…ead replica db instances.
…' into read-replica-deletion-protection
There was a problem hiding this 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?
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. |
Got it, that's fine. Can you please get tests passing, as per the contributing guide? |
…/Remesh/terraform-google-sql-db into read-replica-deletion-protection
@morgante Tests are now passing, sorry this took so long, had to fix things from previous merged PR's. |
modules/postgresql/variables.tf
Outdated
variable "read_replica_deletion_protection" { | ||
description = "Used to block Terraform from deleting replica SQL Instances." | ||
type = bool | ||
default = true |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR adds a variable to manage read replica deletion protection.