mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(terraform/gcp): abandon SQL user on destroy (#29855)
google_sql_user.app issues DROP ROLE on destroy, which Postgres refuses because the role owns every table the migrations job created (75 objects). The previous deletion_policy=ABANDON on google_sql_database keeps the DB intact through destroy, so the role still owns its objects. Set the same policy on the user; the instance deletion takes both the database and the role with it anyway.
This commit is contained in:
parent
43c10370ee
commit
38b28b96ff
1 changed files with 2 additions and 0 deletions
|
|
@ -108,6 +108,8 @@ resource "google_sql_user" "app" {
|
|||
name = var.db_username
|
||||
instance = google_sql_database_instance.writer.name
|
||||
password = random_password.db_password.result
|
||||
|
||||
deletion_policy = "ABANDON"
|
||||
}
|
||||
|
||||
resource "google_secret_manager_secret" "db_password" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue