artifactregistry: updated repository docs and import format #8873
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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) iflocation
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, and add more documentation about locations and what locations are valid.repository_id
for the IAM resourceAlso 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