-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Added Artifact Registry product #3360
Added Artifact Registry product #3360
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! I have just a couple minor fixes.
products/artifactregistry/api.yaml
Outdated
required: true | ||
input: true | ||
- !ruby/object:Api::Type::String | ||
name: 'region' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving to using location
for resources especially when the url path uses the same naming. It also looks like this may support locations like us
or europe
based on the output of https://artifactregistry.googleapis.com/v1beta1/projects/{{project}}/locations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing region->location breaks the autogenerated iam code. I tried changing around the settings but it always gives the following error:
Error: Import id "" doesn't match any of the accepted formats: [projects/(?P[^/]+)/locations/(?P[^/]+)/repositories/(?P[^/]+) (?P[^/]+)/(?P[^/]+)/(?P[^/]+) (?P[^/]+)/(?P[^/]+)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can update the IAM import format to use location as well. See https://github.com/GoogleCloudPlatform/magic-modules/blob/master/products/cloudrun/api.yaml#L241-L245 as an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks! Was going in a completely wrong direction because of the empty string in the error message. Fixed that too.
versions: | ||
- !ruby/object:Api::Product::Version | ||
name: beta | ||
base_url: https://artifactregistry.googleapis.com/v1beta1/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when we upgrade to v1? Do we have multiple version of this, or just change this string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are multiple APIs we try to keep multiple versions
specified here. That will generate terraform-provider-google-beta which will call into the beta API and terraform-provider-google which will call the v1 endpoints. In the future if fields are added to the beta API that haven't made it to v1 we can support those.
Also fixed incorrect import error message
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the links to website side-bar and if the build passes it looks good. Thanks!
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 2 files changed, 1 insertion(+), 2 deletions(-)) |
* Added artifact registry product * Artifact Registry fixes * Switched property from region -> location Also fixed incorrect import error message * Add artifact registry links to website Co-authored-by: Chris Stephens <chrisst@google.com>
Adds support for Artifact Registry
Fixes hashicorp/terraform-provider-google#5928.
Release Note Template for Downstream PRs (will be copied)