Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artifactregistry: updated repository docs and import format #8873

Conversation

modular-magician
Copy link
Collaborator

It turns out that fixing importing regional or multi-region artifact repository resources is challenging. Regional ones could eventually be inferred based on the provider location, if ReplaceVars were updated and / or custom code were used, but multi-region ones will likely not be possible, because (in my understanding), we can't look at the actual resource's defined location when importing, and while we could maybe infer regional location from provider region, the multi-regional path has multiple options, so I don't think there's a way to guess the multi-region location -- for some resources, they'll fall back to global (or a service default, like US for Bigquery) if location isn't already present or inferrable from the provider, but in this case, doesn't seem safe.

So, this is basically just docs fixes and one other tweak (see my comment about properties vs. parameters).

See description and discussion in #12320, as well as the linked issue, for more on this.

  • Update import format to {{location}}/{{repository_id}} or the longer version of the same; standardize to repository_id for the IAM resource, and add more documentation about locations and what locations are valid.

  • Also add a multi-region example test case.

Part of hashicorp/terraform-provider-google#19266

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


Derived from GoogleCloudPlatform/magic-modules#12346

[upstream:d2c973ed3542bc879b0db34ef649e0307e29b05f]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner December 9, 2024 19:27
@modular-magician modular-magician merged commit 30515a4 into hashicorp:main Dec 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant