Skip to content

Add deletion protection for google_alloydb_cluster #19651

Open
@nblxa

Description

@nblxa

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 a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Description

Currently, google_alloydb_cluster doesn't implement a deletion protection flag (such as in google_sql_database_instance, for example). This may cause data loss in situations when the cluster is destroyed or replaced by mistake.

Please note that Terraform's own prevent_destroy flag may not be used with variables, so it would not be a full replacement of the deletion protection flag on the resource. See the linked issue.

New or Affected Resource(s)

  • google_alloydb_cluster

Potential Terraform Configuration

resource "google_alloydb_cluster" "default" {
  cluster_id = "alloydb-cluster"
  location   = "us-central1"
  network_config {
    network = google_compute_network.default.id
  }
  deletion_protection = var.alloydb_deletion_protection
}

variable "cloudsql_deletion_protection" {}

References

hashicorp/terraform#22544

b/374161653

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions