hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.29k stars 1.72k forks source link

Resource google_dataform_repository is missing "force" (delete) argument #14848

Open NemanjaMilenkovic opened 1 year ago

NemanjaMilenkovic commented 1 year ago

Community Note

Description

google_dataform_repository dosen't have "force" argument. Without "force", on delete, the request will only succeed if the repository has no child resources.

That is, "force needs to be included for any child resources of the repository will also be deleted.

New or Affected Resource(s)

google_dataform_repository

Potential Terraform Configuration

It can look like this (differes from Dataform API but matches GSC force_delete):

resource "google_dataform_repository" "dataform_respository" {
  name     = local.dataform_repository_name
  project = var.gcp_project_id
  region  = var.gcp_project_region

  force_delete = true
}

References

This seems to be supported by API

https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/delete

b/305278187

melinath commented 11 months ago

we would likely want to implement this with a deletion_policy field: https://googlecloudplatform.github.io/magic-modules/best-practices/#deletion-policy