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

Firestore database with delete protection enabled should fail on destroy #16325

Comments

@IchordeDionysos
Copy link

IchordeDionysos commented Oct 20, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Affected Resource(s)

  • google_firestore_database

Terraform Configuration Files

resource "google_firestore_database" "database" {
  project     = var.project
  name        = var.database
  location_id = var.location_id
  type        = "FIRESTORE_NATIVE"

  delete_protection_state = "DELETE_PROTECTION_ENABLED"
}

Debug Output

Truncated output

2023-10-20T21:15:59.365Z [INFO]  Terraform version: 1.4.4
2023-10-20T21:15:59.365Z [DEBUG] using github.com/hashicorp/go-tfe v1.18.0
2023-10-20T21:15:59.365Z [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2
2023-10-20T21:15:59.365Z [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2023-10-20T21:15:59.365Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0
2023-10-20T21:15:59.365Z [DEBUG] using github.com/zclconf/go-cty v1.12.1
2023-10-20T21:15:59.365Z [INFO]  Go runtime version: go1.19.6
2023-10-20T21:15:59.365Z [INFO]  CLI args: []string{"terraform", "destroy"}
2023-10-20T21:15:59.366Z [DEBUG] Attempting to open CLI config file: /Users/dennis/.terraformrc
2023-10-20T21:15:59.366Z [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2023-10-20T21:15:59.366Z [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2023-10-20T21:15:59.366Z [DEBUG] ignoring non-existing provider search directory /Users/dennis/.terraform.d/plugins
2023-10-20T21:15:59.366Z [DEBUG] ignoring non-existing provider search directory /Users/dennis/Library/Application Support/io.terraform/plugins
2023-10-20T21:15:59.366Z [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2023-10-20T21:15:59.367Z [INFO]  CLI command args: []string{"destroy"}
2023-10-20T21:15:59.375Z [DEBUG] New state was assigned lineage "910a2a18-105d-6dd4-429b-865cc0ff35b3"
2023-10-20T21:15:59.460Z [DEBUG] checking for provisioner in "."
2023-10-20T21:15:59.462Z [DEBUG] checking for provisioner in "/opt/homebrew/bin"
2023-10-20T21:15:59.465Z [INFO]  backend/local: starting Apply operation
2023-10-20T21:15:59.471Z [DEBUG] created provider logger: level=debug
2023-10-20T21:15:59.471Z [INFO]  provider: configuring client automatic mTLS
2023-10-20T21:15:59.483Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5]
2023-10-20T21:15:59.487Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6190
2023-10-20T21:15:59.487Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5
2023-10-20T21:15:59.548Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: configuring server automatic mTLS: timestamp=2023-10-20T21:15:59.548Z
2023-10-20T21:15:59.558Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: plugin address: address=/var/folders/9l/yxmlk4dj2ll5vjt28_70kvvw0000gn/T/plugin2776924074 network=unix timestamp=2023-10-20T21:15:59.557Z
2023-10-20T21:15:59.558Z [DEBUG] provider: using plugin: version=5
2023-10-20T21:15:59.619Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-20T21:15:59.620Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6190
2023-10-20T21:15:59.620Z [DEBUG] provider: plugin exited
2023-10-20T21:15:59.621Z [DEBUG] Building and walking validate graph
2023-10-20T21:15:59.622Z [DEBUG] ProviderTransformer: "google_firestore_database.database" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/hashicorp/google"]
2023-10-20T21:15:59.622Z [DEBUG] ReferenceTransformer: "google_firestore_database.database" references: [var.database var.project var.location_id]
2023-10-20T21:15:59.622Z [DEBUG] ReferenceTransformer: "var.location_id" references: []
2023-10-20T21:15:59.622Z [DEBUG] ReferenceTransformer: "var.project" references: []
2023-10-20T21:15:59.622Z [DEBUG] ReferenceTransformer: "var.database" references: []
2023-10-20T21:15:59.622Z [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/google\"]" references: []
2023-10-20T21:15:59.622Z [DEBUG] Starting graph walk: walkValidate
2023-10-20T21:15:59.623Z [DEBUG] created provider logger: level=debug
2023-10-20T21:15:59.623Z [INFO]  provider: configuring client automatic mTLS
2023-10-20T21:15:59.627Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5]
2023-10-20T21:15:59.630Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6191
2023-10-20T21:15:59.630Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5
2023-10-20T21:15:59.668Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: configuring server automatic mTLS: timestamp=2023-10-20T21:15:59.668Z
2023-10-20T21:15:59.677Z [DEBUG] provider: using plugin: version=5
2023-10-20T21:15:59.677Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: plugin address: address=/var/folders/9l/yxmlk4dj2ll5vjt28_70kvvw0000gn/T/plugin3774182471 network=unix timestamp=2023-10-20T21:15:59.677Z
2023-10-20T21:15:59.730Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-20T21:15:59.731Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6191
2023-10-20T21:15:59.731Z [DEBUG] provider: plugin exited
2023-10-20T21:15:59.731Z [INFO]  backend/local: apply calling Plan
2023-10-20T21:15:59.731Z [DEBUG] Building and walking plan graph for NormalMode
2023-10-20T21:15:59.732Z [DEBUG] ProviderTransformer: "google_firestore_database.database (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/hashicorp/google"]
2023-10-20T21:15:59.732Z [DEBUG] ReferenceTransformer: "var.project" references: []
2023-10-20T21:15:59.732Z [DEBUG] ReferenceTransformer: "var.database" references: []
2023-10-20T21:15:59.732Z [DEBUG] ReferenceTransformer: "var.location_id" references: []
2023-10-20T21:15:59.732Z [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/google\"]" references: []
2023-10-20T21:15:59.732Z [DEBUG] ReferenceTransformer: "google_firestore_database.database (expand)" references: [var.project var.location_id var.database]
2023-10-20T21:15:59.732Z [DEBUG] Starting graph walk: walkPlan
2023-10-20T21:15:59.732Z [DEBUG] created provider logger: level=debug
2023-10-20T21:15:59.732Z [INFO]  provider: configuring client automatic mTLS
2023-10-20T21:15:59.736Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5]
2023-10-20T21:15:59.740Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6192
2023-10-20T21:15:59.740Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5
2023-10-20T21:15:59.777Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: configuring server automatic mTLS: timestamp=2023-10-20T21:15:59.777Z
2023-10-20T21:15:59.786Z [DEBUG] provider: using plugin: version=5
2023-10-20T21:15:59.942Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Authenticating using DefaultClient...: tf_req_id=6b4428d6-15d2-664a-382c-be448afba995 @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1613 @module=google tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google tf_rpc=ConfigureProvider timestamp=2023-10-20T21:15:59.902Z
2023-10-20T21:15:59.942Z [INFO]  provider.terraform-provider-google_v5.2.0_x5:   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]: tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1614 @module=google tf_req_id=6b4428d6-15d2-664a-382c-be448afba995 timestamp=2023-10-20T21:15:59.903Z
2023-10-20T21:15:59.942Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Authenticating using DefaultClient...: @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1613 tf_mux_provider=*proto5server.Server @module=google tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=6b4428d6-15d2-664a-382c-be448afba995 tf_rpc=ConfigureProvider timestamp=2023-10-20T21:15:59.903Z
2023-10-20T21:15:59.942Z [INFO]  provider.terraform-provider-google_v5.2.0_x5:   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]: @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1614 tf_provider_addr=registry.terraform.io/hashicorp/google tf_rpc=ConfigureProvider @module=google tf_mux_provider=*proto5server.Server tf_req_id=6b4428d6-15d2-664a-382c-be448afba995 timestamp=2023-10-20T21:15:59.903Z
2023-10-20T21:15:59.943Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:15:59 [DEBUG] Waiting for state to become: [success]
2023-10-20T21:16:00.152Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Terraform is using this identity: [email protected]: @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1487 @module=google tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=6b4428d6-15d2-664a-382c-be448afba995 tf_rpc=ConfigureProvider timestamp=2023-10-20T21:16:00.152Z
2023-10-20T21:16:00.153Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Called provider defined Provider Configure: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_configureprovider.go:20 @module=sdk.framework tf_mux_provider=*proto5server.Server tf_req_id=6b4428d6-15d2-664a-382c-be448afba995 tf_provider_addr=registry.terraform.io/hashicorp/google tf_rpc=ConfigureProvider timestamp=2023-10-20T21:16:00.153Z
2023-10-20T21:16:00.155Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO] Authenticating using DefaultClient...
2023-10-20T21:16:00.155Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2023-10-20T21:16:00.155Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO] Authenticating using DefaultClient...
2023-10-20T21:16:00.155Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2023-10-20T21:16:00.155Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Waiting for state to become: [success]
2023-10-20T21:16:00.271Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO] Terraform is using this identity: [email protected]
2023-10-20T21:16:00.272Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] parent context canceled, cleaning up batcher batches
2023-10-20T21:16:00.272Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] parent context canceled, cleaning up batcher batches
2023-10-20T21:16:00.272Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Stopping batcher "Service Usage"
2023-10-20T21:16:00.272Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Stopping batcher "IAM"
2023-10-20T21:16:00.272Z [INFO]  ReferenceTransformer: reference not found: "var.project"
2023-10-20T21:16:00.272Z [INFO]  ReferenceTransformer: reference not found: "var.database"
2023-10-20T21:16:00.272Z [INFO]  ReferenceTransformer: reference not found: "var.location_id"
2023-10-20T21:16:00.272Z [DEBUG] ReferenceTransformer: "google_firestore_database.database" references: []
google_firestore_database.database: Refreshing state... [id=projects/not-a-project/databases/fake-database-two]
2023-10-20T21:16:00.276Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Waiting for state to become: [success]
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Retry Transport: starting RoundTrip retry loop
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Retry Transport: request attempt 0
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Google API Request Details:
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: ---[ REQUEST ]---------------------------------------
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: GET /v1/projects/not-a-project/databases/fake-database-two?alt=json HTTP/1.1
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Host: firestore.googleapis.com
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: User-Agent: Terraform/1.4.4 (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google/5.2.0
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Content-Type: application/json
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Accept-Encoding: gzip
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 
2023-10-20T21:16:00.277Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: -----------------------------------------------------
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Google API Response Details:
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: ---[ RESPONSE ]--------------------------------------
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: HTTP/2.0 200 OK
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Cache-Control: private
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Content-Type: application/json; charset=UTF-8
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Date: Fri, 20 Oct 2023 21:16:00 GMT
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Server: ESF
2023-10-20T21:16:00.473Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Vary: Origin
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Vary: X-Origin
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Vary: Referer
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: X-Content-Type-Options: nosniff
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: X-Frame-Options: SAMEORIGIN
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: X-Xss-Protection: 0
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: {
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "name": "projects/not-a-project/databases/fake-database-two",
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "uid": "e12ca547-766b-4df2-b9a5-411a64ae12ca",
2023-10-20T21:16:00.475Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "createTime": "2023-10-20T21:15:24.037031Z",
2023-10-20T21:16:00.476Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "updateTime": "2023-10-20T21:15:24.037031Z",
2023-10-20T21:16:00.476Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "locationId": "europe-west3",
2023-10-20T21:16:00.476Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "type": "FIRESTORE_NATIVE",
2023-10-20T21:16:00.476Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "concurrencyMode": "PESSIMISTIC",
2023-10-20T21:16:00.476Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "versionRetentionPeriod": "3600s",
2023-10-20T21:16:00.476Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "earliestVersionTime": "2023-10-20T21:15:24.037031Z",
2023-10-20T21:16:00.476Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "appEngineIntegrationMode": "DISABLED",
2023-10-20T21:16:00.476Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "pointInTimeRecoveryEnablement": "POINT_IN_TIME_RECOVERY_DISABLED",
2023-10-20T21:16:00.478Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "deleteProtectionState": "DELETE_PROTECTION_ENABLED",
2023-10-20T21:16:00.478Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5:   "etag": "IMfKz4jGhYIDMKfHm/fFhYID"
2023-10-20T21:16:00.478Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: }
2023-10-20T21:16:00.478Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 
2023-10-20T21:16:00.478Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: -----------------------------------------------------
2023-10-20T21:16:00.478Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Retry Transport: Stopping retries, last request was successful
2023-10-20T21:16:00.478Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Retry Transport: Returning after 1 attempts
2023-10-20T21:16:00.482Z [WARN]  Provider "registry.terraform.io/hashicorp/google" produced an unexpected new value for google_firestore_database.database during refresh.
      - .etag: was cty.StringVal("IMjyvvzFhYIDMKfHm/fFhYID"), but now cty.StringVal("IMfKz4jGhYIDMKfHm/fFhYID")
2023-10-20T21:16:00.486Z [WARN]  Provider "registry.terraform.io/hashicorp/google" produced an invalid plan for google_firestore_database.database, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .point_in_time_recovery_enablement: planned value cty.StringVal("POINT_IN_TIME_RECOVERY_DISABLED") for a non-computed attribute
2023-10-20T21:16:00.487Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] [transport] [server-transport 0x140007e61a0] Closing: Server.Stop called 
2023-10-20T21:16:00.487Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] [transport] [server-transport 0x140007e61a0] loopyWriter exiting with error: transport closed by client 
2023-10-20T21:16:00.487Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-20T21:16:00.494Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6192
2023-10-20T21:16:00.494Z [DEBUG] provider: plugin exited
2023-10-20T21:16:00.494Z [DEBUG] Building and walking plan graph for DestroyMode
2023-10-20T21:16:00.495Z [DEBUG] ProviderTransformer: "google_firestore_database.database" (*terraform.NodePlanDestroyableResourceInstance) needs provider["registry.terraform.io/hashicorp/google"]
2023-10-20T21:16:00.495Z [DEBUG] ReferenceTransformer: "var.location_id" references: []
2023-10-20T21:16:00.495Z [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/google\"]" references: []
2023-10-20T21:16:00.495Z [DEBUG] ReferenceTransformer: "var.project" references: []
2023-10-20T21:16:00.495Z [DEBUG] ReferenceTransformer: "var.database" references: []
2023-10-20T21:16:00.495Z [DEBUG] Starting graph walk: walkPlanDestroy
2023-10-20T21:16:00.495Z [DEBUG] created provider logger: level=debug
2023-10-20T21:16:00.495Z [INFO]  provider: configuring client automatic mTLS
2023-10-20T21:16:00.502Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5]
2023-10-20T21:16:00.510Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6196
2023-10-20T21:16:00.510Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5
2023-10-20T21:16:00.558Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: configuring server automatic mTLS: timestamp=2023-10-20T21:16:00.558Z
2023-10-20T21:16:00.567Z [DEBUG] provider: using plugin: version=5
2023-10-20T21:16:00.759Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Authenticating using DefaultClient...: @module=google tf_req_id=697c2c99-a5a6-ba50-35a0-9c2054466042 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1613 tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google timestamp=2023-10-20T21:16:00.651Z
2023-10-20T21:16:00.759Z [INFO]  provider.terraform-provider-google_v5.2.0_x5:   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]: tf_provider_addr=registry.terraform.io/hashicorp/google tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1614 @module=google tf_mux_provider=*proto5server.Server tf_req_id=697c2c99-a5a6-ba50-35a0-9c2054466042 timestamp=2023-10-20T21:16:00.651Z
2023-10-20T21:16:00.760Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Authenticating using DefaultClient...: tf_mux_provider=*proto5server.Server @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1613 @module=google tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=697c2c99-a5a6-ba50-35a0-9c2054466042 tf_rpc=ConfigureProvider timestamp=2023-10-20T21:16:00.651Z
2023-10-20T21:16:00.760Z [INFO]  provider.terraform-provider-google_v5.2.0_x5:   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]: @module=google tf_mux_provider=*proto5server.Server tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1614 tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=697c2c99-a5a6-ba50-35a0-9c2054466042 timestamp=2023-10-20T21:16:00.651Z
2023-10-20T21:16:00.761Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Waiting for state to become: [success]
2023-10-20T21:16:00.881Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Terraform is using this identity: [email protected]: @module=google tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=697c2c99-a5a6-ba50-35a0-9c2054466042 tf_mux_provider=*proto5server.Server tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1487 timestamp=2023-10-20T21:16:00.881Z
2023-10-20T21:16:00.881Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Called provider defined Provider Configure: @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_configureprovider.go:20 tf_mux_provider=*proto5server.Server @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=697c2c99-a5a6-ba50-35a0-9c2054466042 tf_rpc=ConfigureProvider timestamp=2023-10-20T21:16:00.881Z
2023-10-20T21:16:00.882Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO] Authenticating using DefaultClient...
2023-10-20T21:16:00.882Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2023-10-20T21:16:00.882Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO] Authenticating using DefaultClient...
2023-10-20T21:16:00.882Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2023-10-20T21:16:00.882Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:00 [DEBUG] Waiting for state to become: [success]
2023-10-20T21:16:01.026Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:01 [INFO] Terraform is using this identity: [email protected]
2023-10-20T21:16:01.027Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:01 [DEBUG] parent context canceled, cleaning up batcher batches
2023-10-20T21:16:01.027Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:01 [DEBUG] parent context canceled, cleaning up batcher batches
2023-10-20T21:16:01.027Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:01 [DEBUG] Stopping batcher "Service Usage"
2023-10-20T21:16:01.027Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:01 [DEBUG] Stopping batcher "IAM"
2023-10-20T21:16:01.031Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:01 [DEBUG] [transport] [server-transport 0x14001110680] Closing: Server.Stop called 
2023-10-20T21:16:01.031Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-20T21:16:01.036Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6196
2023-10-20T21:16:01.036Z [DEBUG] provider: plugin exited
2023-10-20T21:16:01.036Z [DEBUG] building apply graph to check for errors
2023-10-20T21:16:01.037Z [DEBUG] ProviderTransformer: "google_firestore_database.database (destroy)" (*terraform.NodeDestroyResourceInstance) needs provider["registry.terraform.io/hashicorp/google"]
2023-10-20T21:16:01.037Z [DEBUG] ProviderTransformer: "google_firestore_database.database (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hashicorp/google"]
2023-10-20T21:16:01.037Z [DEBUG] ReferenceTransformer: "google_firestore_database.database (expand)" references: []
2023-10-20T21:16:01.037Z [DEBUG] ReferenceTransformer: "var.project" references: []
2023-10-20T21:16:01.037Z [DEBUG] ReferenceTransformer: "var.database" references: []
2023-10-20T21:16:01.037Z [DEBUG] ReferenceTransformer: "var.location_id" references: []
2023-10-20T21:16:01.037Z [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/google\"]" references: []
2023-10-20T21:16:01.037Z [DEBUG] pruneUnusedNodes: google_firestore_database.database (expand) is no longer needed, removing

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # google_firestore_database.database will be destroyed
  - resource "google_firestore_database" "database" {
      - app_engine_integration_mode       = "DISABLED" -> null
      - concurrency_mode                  = "PESSIMISTIC" -> null
      - delete_protection_state           = "DELETE_PROTECTION_ENABLED" -> null
      - earliest_version_time             = "2023-10-20T21:15:24.037031Z" -> null
      - etag                              = "IMfKz4jGhYIDMKfHm/fFhYID" -> null
      - id                                = "projects/not-a-project/databases/fake-database-two" -> null
      - location_id                       = "europe-west3" -> null
      - name                              = "fake-database-two" -> null
      - point_in_time_recovery_enablement = "POINT_IN_TIME_RECOVERY_DISABLED" -> null
      - project                           = "not-a-project" -> null
      - type                              = "FIRESTORE_NATIVE" -> null
      - uid                               = "e12ca547-766b-4df2-b9a5-411a64ae12ca" -> null
      - version_retention_period          = "3600s" -> null
    }

Plan: 0 to add, 0 to change, 1 to destroy.
2023-10-20T21:16:01.050Z [DEBUG] command: asking for input: "\nDo you really want to destroy all resources?"

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

2023-10-20T21:16:03.204Z [INFO]  backend/local: apply calling Apply
2023-10-20T21:16:03.204Z [DEBUG] Building and walking apply graph for DestroyMode plan
2023-10-20T21:16:03.206Z [DEBUG] ProviderTransformer: "google_firestore_database.database (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hashicorp/google"]
2023-10-20T21:16:03.206Z [DEBUG] ProviderTransformer: "google_firestore_database.database (destroy)" (*terraform.NodeDestroyResourceInstance) needs provider["registry.terraform.io/hashicorp/google"]
2023-10-20T21:16:03.206Z [DEBUG] ReferenceTransformer: "google_firestore_database.database (expand)" references: []
2023-10-20T21:16:03.206Z [DEBUG] ReferenceTransformer: "var.project" references: []
2023-10-20T21:16:03.206Z [DEBUG] ReferenceTransformer: "var.database" references: []
2023-10-20T21:16:03.206Z [DEBUG] ReferenceTransformer: "var.location_id" references: []
2023-10-20T21:16:03.206Z [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/google\"]" references: []
2023-10-20T21:16:03.206Z [DEBUG] pruneUnusedNodes: google_firestore_database.database (expand) is no longer needed, removing
2023-10-20T21:16:03.206Z [DEBUG] Starting graph walk: walkDestroy
2023-10-20T21:16:03.207Z [DEBUG] created provider logger: level=debug
2023-10-20T21:16:03.207Z [INFO]  provider: configuring client automatic mTLS
2023-10-20T21:16:03.216Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5]
2023-10-20T21:16:03.221Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6205
2023-10-20T21:16:03.221Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5
2023-10-20T21:16:03.269Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: configuring server automatic mTLS: timestamp=2023-10-20T21:16:03.269Z
2023-10-20T21:16:03.278Z [DEBUG] provider: using plugin: version=5
2023-10-20T21:16:03.425Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Authenticating using DefaultClient...: tf_mux_provider=*proto5server.Server tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1613 @module=google tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=414b0206-50e5-7cc8-f0f6-372437fe6e88 timestamp=2023-10-20T21:16:03.389Z
2023-10-20T21:16:03.425Z [INFO]  provider.terraform-provider-google_v5.2.0_x5:   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]: @module=google tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1614 tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=414b0206-50e5-7cc8-f0f6-372437fe6e88 tf_mux_provider=*proto5server.Server timestamp=2023-10-20T21:16:03.389Z
2023-10-20T21:16:03.425Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Authenticating using DefaultClient...: tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1613 @module=google tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=414b0206-50e5-7cc8-f0f6-372437fe6e88 timestamp=2023-10-20T21:16:03.389Z
2023-10-20T21:16:03.425Z [INFO]  provider.terraform-provider-google_v5.2.0_x5:   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]: tf_rpc=ConfigureProvider @module=google tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=414b0206-50e5-7cc8-f0f6-372437fe6e88 @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1614 timestamp=2023-10-20T21:16:03.389Z
2023-10-20T21:16:03.426Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [DEBUG] Waiting for state to become: [success]
2023-10-20T21:16:03.606Z [INFO]  provider.terraform-provider-google_v5.2.0_x5: Terraform is using this identity: [email protected]: tf_mux_provider=*proto5server.Server tf_rpc=ConfigureProvider tf_req_id=414b0206-50e5-7cc8-f0f6-372437fe6e88 @caller=github.com/hashicorp/terraform-provider-google/google/fwtransport/framework_config.go:1487 @module=google tf_provider_addr=registry.terraform.io/hashicorp/google timestamp=2023-10-20T21:16:03.606Z
2023-10-20T21:16:03.606Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: Called provider defined Provider Configure: @module=sdk.framework tf_mux_provider=*proto5server.Server tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=414b0206-50e5-7cc8-f0f6-372437fe6e88 @caller=github.com/hashicorp/[email protected]/internal/fwserver/server_configureprovider.go:20 tf_rpc=ConfigureProvider timestamp=2023-10-20T21:16:03.606Z
2023-10-20T21:16:03.608Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [INFO] Authenticating using DefaultClient...
2023-10-20T21:16:03.608Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2023-10-20T21:16:03.608Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [INFO] Authenticating using DefaultClient...
2023-10-20T21:16:03.608Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [INFO]   -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2023-10-20T21:16:03.608Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [DEBUG] Waiting for state to become: [success]
2023-10-20T21:16:03.724Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [INFO] Terraform is using this identity: [email protected]
2023-10-20T21:16:03.724Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [DEBUG] parent context canceled, cleaning up batcher batches
2023-10-20T21:16:03.724Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [DEBUG] parent context canceled, cleaning up batcher batches
2023-10-20T21:16:03.724Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [DEBUG] Stopping batcher "Service Usage"
2023-10-20T21:16:03.724Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [DEBUG] Stopping batcher "IAM"
google_firestore_database.database: Destroying... [id=projects/not-a-project/databases/fake-database-two]
2023-10-20T21:16:03.728Z [INFO]  Starting apply for google_firestore_database.database
2023-10-20T21:16:03.728Z [DEBUG] google_firestore_database.database: applying the planned Delete change
2023-10-20T21:16:03.728Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [WARNING] Firestore Database resources cannot be deleted from Google Cloud. The resource projects/not-a-project/databases/fake-database-two will be removed from Terraform state, but will still be present on Google Cloud.
google_firestore_database.database: Destruction complete after 0s
2023-10-20T21:16:03.737Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [DEBUG] [transport] [server-transport 0x140016d2ea0] Closing: Server.Stop called 
2023-10-20T21:16:03.737Z [DEBUG] provider.terraform-provider-google_v5.2.0_x5: 2023/10/20 21:16:03 [DEBUG] [transport] [server-transport 0x140016d2ea0] loopyWriter exiting with error: transport closed by client 
2023-10-20T21:16:03.737Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-10-20T21:16:03.740Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.2.0/darwin_arm64/terraform-provider-google_v5.2.0_x5 pid=6205
2023-10-20T21:16:03.740Z [DEBUG] provider: plugin exited

Destroy complete! Resources: 1 destroyed.

Expected Behavior

Fail the destruction of the Firestore database.

Potentially even planning to destroy a Firestore database that has delete protection enabled.
The information should be there during plan time I think 🤔

Actual Behavior

Terraform claims to have successfully deleted the Firestore database.

Steps to Reproduce

  1. terraform apply
  2. terraform destroy

Important Factoids

References

b/306863791

@github-actions github-actions bot added forward/review In review; remove label to forward service/firestore-controlplane labels Oct 20, 2023
@edwardmedia edwardmedia removed the forward/review In review; remove label to forward label Oct 20, 2023
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 9, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* Either delete protection or deletion policy being set prevents destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 10, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 14, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 14, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
rwhogg added a commit to rwhogg/magic-modules that referenced this issue Nov 21, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
slevenick pushed a commit to GoogleCloudPlatform/magic-modules that referenced this issue Nov 21, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
modular-magician added a commit to modular-magician/terraform-provider-google-beta that referenced this issue Nov 21, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
[upstream:4829cc4a4f604db5d6e1d09a7c85df6250ebc19a]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Nov 21, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp#16488
Fixes hashicorp#16404
Fixes hashicorp#16325
[upstream:4829cc4a4f604db5d6e1d09a7c85df6250ebc19a]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to hashicorp/terraform-provider-google-beta that referenced this issue Nov 21, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
[upstream:4829cc4a4f604db5d6e1d09a7c85df6250ebc19a]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit that referenced this issue Nov 21, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes #16488
Fixes #16404
Fixes #16325
[upstream:4829cc4a4f604db5d6e1d09a7c85df6250ebc19a]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to modular-magician/terraform-google-conversion that referenced this issue Nov 21, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
[upstream:4829cc4a4f604db5d6e1d09a7c85df6250ebc19a]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to GoogleCloudPlatform/terraform-google-conversion that referenced this issue Nov 21, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
[upstream:4829cc4a4f604db5d6e1d09a7c85df6250ebc19a]

Signed-off-by: Modular Magician <[email protected]>
jialei-chen pushed a commit to jialei-chen/magic-modules that referenced this issue Nov 29, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
trodge pushed a commit to trodge/magic-modules that referenced this issue Dec 8, 2023
Due to backwards compatibility concerns, the default behavior remains to
abandon the database upon destroy rather than to actually delete it.

To actually delete the database, you must set deletion_policy to DELETE,
and apply if necessary, before running `terraform destroy`.

This also cleans up some related deletion-related docs and bugs:

* Updates the delete protection docs
* delete_protection_state being enabled with deletion_policy = DELETE fails the destroy

Fixes hashicorp/terraform-provider-google#16488
Fixes hashicorp/terraform-provider-google#16404
Fixes hashicorp/terraform-provider-google#16325
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.