The module creates any number of Artifact Registries in Google Cloud with custom image retention and access policies.

Artifact Registry in Google Cloud

Artifact Registry management in Google Cloud
$250
BUY
313
Log in to Corewide IaC registry

Once you have a Corewide Solutions Portal account, this one-time action will use your browser session to retrieve credentials:

 shellterraform login solutions.corewide.com
Provision instructions

Initialize mandatory providers:

Copy and paste into your Terraform configuration and insert the variables:

 hclmodule "tf_gcp_gcr" {
  source  = "solutions.corewide.com/google-cloud/tf-gcp-gcr/google"
  version = "~> 1.0.0"

  # specify module inputs here or try one of the examples below
  ...
}

Initialize the setup:

 shellterraform init
Define update strategy

Corewide DevOps team strictly follows Semantic Versioning Specification to provide our clients with products that have predictable upgrades between versions. We recommend pinning patch versions of our modules using pessimistic constraint operator (~>) to prevent breaking changes during upgrades.

To get new features during the upgrades (without breaking compatibility), use ~> 1.0 and run terraform init -upgrade

For the safest setup, use strict pinning with version = "1.0.0"

v1.0.0 released 6 months, 2 weeks ago

Multiple repositories with custom configurations (different locations, access policies and labels):

 hclmodule "gcr" {
  source  = "solutions.corewide.com/google-cloud/tf-gcp-gcr/google"
  version = "~> 1.0"

  repos = {
    foo = {
      location = "us-east1"

      rw_accounts = {
        serviceAccount = ["[email protected]"]
      }

      labels = {
        name = "foo"
      }
    }
    bar = {
      location    = "us-west1"
      description = "Custom repository description"
      max_images  = 100

      ro_accounts = {
        user = ["[email protected]"]
      }

      labels = {
        name = "bar"
      }
    }
  }
}

Minimal setup with one repository:

 hclmodule "gcr" {
  source  = "solutions.corewide.com/google-cloud/tf-gcp-gcr/google"
  version = "~> 1.0"

  repos = {
    foo = {}
  }
}
Variable Description Type Default Required Sensitive
repos Map of repositories parameters map(object) yes no
repos[<key>] Repository name string yes no
repos[<key>].description User-provided description of the repository string no no
repos[<key>].labels Labels with user-defined metadata map(string) {} no no
repos[<key>].location Location the repository is located in string no no
repos[<key>].max_images Number of images stored before cleanup starts number 50 no no
repos[<key>].ro_accounts List of members with read only access to the repository map(list(string)) {} no no
repos[<key>].rw_accounts List of members with read/write access to the repository map(list(string)) {} no no
Output Description Type Sensitive
repositories Map of repository data computed no
Dependency Version Kind
terraform >= 1.3 CLI
hashicorp/google ~> 6.2 provider

Not sure where to start?
Let's find your perfect match.