-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Google Artifact Registry support for common_repository
#20278
Google Artifact Registry support for common_repository
#20278
Comments
commonRepository
common_repository
Adds support for `common_repository` in remote `google_artifact_registry_repository` repositories. This is useful for creating pull-through caches in front of other Artifact Registry repos. Fixes hashicorp/terraform-provider-google#20278 ```release-note:enhancement artifactregistry: added `common_repository` field to `google_artifact_registry_repository` resource ```
Note from triage: Looks like adding support for this API field is necessary : commonRepository |
Hi @SarahFrench. I have a possible implementation for commonRepository over here: GoogleCloudPlatform/magic-modules#12290 currently waiting for a new test case, which i will attempt to do next |
Adds support for `common_repository` in remote `google_artifact_registry_repository` repositories. This is useful for creating pull-through caches in front of other Artifact Registry repos. Fixes hashicorp/terraform-provider-google#20278 ```release-note:enhancement artifactregistry: added `common_repository` field to `google_artifact_registry_repository` resource ```
Adds support for `common_repository` in remote `google_artifact_registry_repository` repositories. This is useful for creating pull-through caches in front of other Artifact Registry repos. Fixes hashicorp/terraform-provider-google#20278 ```release-note:enhancement artifactregistry: added `common_repository` field to `google_artifact_registry_repository` resource ```
Adds support for `common_repository` in remote `google_artifact_registry_repository` repositories. This is useful for creating pull-through caches in front of other Artifact Registry repos. Fixes hashicorp/terraform-provider-google#20278 ```release-note:enhancement artifactregistry: added `common_repository` field to `google_artifact_registry_repository` resource ```
Adds support for `common_repository` in remote `google_artifact_registry_repository` repositories. This is useful for creating pull-through caches in front of other Artifact Registry repos. Fixes hashicorp/terraform-provider-google#20278 ```release-note:enhancement artifactregistry: added `common_repository` field to `google_artifact_registry_repository` resource ```
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
Allow creating
remote
repositories using thecommonRepository
config from terraform.The goal here would be to create pull-through mirrors of other GAR registries. For example, imagine a central docker
dev
repository in theus-central1
location and you want to create regional caches in other regions, eg:asia-northeast1
,europe-west2
, etc.This can be done from the web console or gcloud CLI, but does not appear possible from Terraform.
I have only experimented with this using Docker repositories. It might be possible with the other types.
In the web console when creating a new repository and selecting
Docker
+Remote
you are presented with an optionArtifact Registry repository
which takes a path to an existing repository in the formprojects/UPSTREAM_PROJECT_ID/locations/REGION/repositories/UPSTREAM_REPOSITORY
Or from
gcloud
CLI using the flag--remote-docker-repo=projects/UPSTREAM_PROJECT_ID/locations/REGION/repositories/UPSTREAM_REPOSITORY
togcloud artifacts repositories create
. See hereI tried a resource similar to this:
But this results in an API error:
Describing a repo created thru the console shows this (relevant parts only):
Comparing that to a remote repository that points to quay.io:
There is a difference in the
remoteRepositoryConfig
structure that leads me to believe the issue might be a lack of acommon_repository
config forremote_repository
.If there is a way to configure a remote repository with the current provider, please let me know and consider updating the docs. Or, if not, it would be great to add support for this in the provider.
New or Affected Resource(s)
Potential Terraform Configuration
This matches the output from
gcloud artifacts repositories describe
References
https://cloud.google.com/artifact-registry/docs/repositories/remote-repo#create-gcloud
b/378495989
The text was updated successfully, but these errors were encountered: