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.33k stars 1.74k forks source link

google_artifact_registry_repository resource cannot create kfp formatted repository #14341

Open arimaverick opened 1 year ago

arimaverick commented 1 year ago

Based on the description, https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/artifact_registry_repository#format mentions it supports all formats. However, while using "kfp" format, it cannot identify the format.

New or Affected Resource(s)

Potential Terraform Configuration

resource "google_artifact_registry_repository" "my-repo" {
  provider = google-beta
  location      = "us-central1"
  repository_id = "my-repository"
  description   = "example docker repository"
  format        = "kfp"
}

Issue

Error: Error creating Repository: googleapi: Error 400: Invalid value at 'repository.format' (type.googleapis.com/google.devtools.artifactregistry.v1beta2.Repository.Format), "kfp" │ Details: │ [ │ { │ "@type": "type.googleapis.com/google.rpc.BadRequest", │ "fieldViolations": [ │ { │ "description": "Invalid value at 'repository.format' (type.googleapis.com/google.devtools.artifactregistry.v1beta2.Repository.Format), \"kfp\"", │ "field": "repository.format" │ } │ ] │ } │ ] │ │ with google_artifact_registry_repository.my-repo, │ on main.tf line 134, in resource "google_artifact_registry_repository" "my-repo": Please suggest. Thanks

trodge commented 1 year ago

b/280101256

yihanzhen commented 1 year ago

kfp is not supported in the v1beta2 API. You are using provider = google-beta so I assume this provider uses the beta API. Is it possible to switch to a provider that uses Artifact Registry V1 API?