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.36k stars 1.75k forks source link

google_vertex_ai_featurestore_entitytype doesnt expose API force destroy option #13788

Open ben-marengo-msmg opened 1 year ago

ben-marengo-msmg commented 1 year ago

Community Note

Description

google_vertex_ai_featurestore_entitytype doesn't expose force destroy option. please can you expose it?

New or Affected Resource(s)

Potential Terraform Configuration

resource "google_vertex_ai_featurestore_entitytype" "my_entity_type" {
  provider     = google-beta
  name         = "my_entity_type"
  featurestore = google_vertex_ai_featurestore.featurestore.id
  force_destroy = true
}

References

see the rest api for it here:

b/305278584

rileykarson commented 1 year ago

Note: We'd want to expose this through a deletion_policy field.

shotarok commented 1 year ago

@rileykarson It seems google_vertex_ai_featurestore supports deletion_policy = true as @ben-marengo-msmg proposed. I wonder if supporting deletion_policy in the google_vertex_ai_featurestore _entitytype is less confusing. What do you think?

melinath commented 1 year ago

It looks like feature store supports force_destroy, which maps to the force query param on the deletion method. Normally force_destroy would mean that a resource can't be deleted unless force_destroy is set; our current best practice would be to use a field called deletion_protection instead. However, for feature store, deletion is not prevented unless there are child resources. So, this is more like a deletion_policy field.

See https://googlecloudplatform.github.io/magic-modules/best-practices/#deletion-policy for more information on deletion_policy.