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

customize deletion_policy #403

Closed
lucas-seismic opened this issue Jan 4, 2023 · 2 comments
Closed

customize deletion_policy #403

lucas-seismic opened this issue Jan 4, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@lucas-seismic
Copy link

TL;DR

hashicorp/terraform-provider-google-beta#4972

# google_sql_database.database will be updated in-place
  ~ resource "google_sql_database" "database" {
      ~ deletion_policy = "ABANDON" -> "DELETE"
        id              = "projects/graphite-test-rileykarson/instances/myinstance/databases/mydb"
        name            = "mydb"
        # (5 unchanged attributes hidden)
    }

The deletion_policy change has 2 implicit steps as follows:

  1. ALTER DATABASE [library-main] SET single WITH NO_WAIT.
  2. ALTER DATABASE [library-main] SET multi_user WITH NO_WAIT.

In our production, there is an exception after the first step and the database access mode wasn't changed back, so all of the services can't connect to the DB anymore.

Could we expose the deletion_policy as a variable in this module? so we can give it a stable value

Terraform Resources

No response

Detailed design

No response

Additional information

No response

@lucas-seismic lucas-seismic added the enhancement New feature or request label Jan 4, 2023
@g-awmalik g-awmalik self-assigned this Jan 9, 2023
@saez0pub
Copy link
Contributor

saez0pub commented Jan 10, 2023

Hello,

I'm also facing this issue 👍
It seems solved for postgresql by 8ab6e37 but not released
Is a released planned soon ?

@g-awmalik
Copy link
Contributor

Yes this seems to have been address by #386 and should be available with v14.0. Keep an eye on this: #380. Closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants