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

Refactor `google_artifact_registry_repository_iam` to require name(selfLink) instead of repo,location and project #9964

Open upodroid opened 3 years ago

upodroid commented 3 years ago

Community Note

Affected Resource(s)

Description

Refactor the required fields for google_artifact_registry_repository_iam_* to require name(a new field) instead of repo, location and project as all these fields are available in the name field from the API or id field.

The resource is in beta so this needs to be done before it goes GA. API is still beta but the product is GA.

  + resource "google_artifact_registry_repository_iam_binding" "artifact_registry_iam_authoritative" {
      + etag       = (known after apply)
      + id         = (known after apply)
      + location   = "europe"
      + members    = [
          + "domain:REDACTED",
        ]
      + project    = "REDACTED"
      + repository = "prod"
      + role       = "roles/artifactregistry.writer"
    }

b/272799216

Subserial commented 1 year ago

The resource was promoted to GA with https://github.com/hashicorp/terraform-provider-google/pull/12063. I believe this is no longer possible as it would be a breaking change.

rileykarson commented 1 year ago

Note: The beta provider's a stable surface too, so this issue as written was a breaking change the resource moved to GA as well.

I think it'd be reasonable to support a name field as an alternative to the split fields, but removing the split ones is unlikely to be worth it. I'm not sure why we put this in Goals over Backlog when we triaged it in the first place.