cloud-foundation-fabric/modules/artifact-registry
Ludovico Magnocavallo 789328ff5a
Bump provider versions to v5.0.0 (#1724)
* bump provider versions to 5.0.0

* fix cloud run, logging and vpc-sc

* Fix secret manager

* fix gke nodepool

* fix gke multitenant stage and blueprint

* Moving alloydb module to experimental.

* Add project to bare resources in examples

* tfdoc

* fix svpc blueprint test

* Revert "fix svpc blueprint test"

This reverts commit 14f02659098070136e64ead600580dd52c23c339.

* Fix GKE peering project

* Disable tests in alloydb module

* Bring back secret ids in secret manager tests

* Remove duplicate key

* last push

---------

Co-authored-by: Julio Castillo <jccb@google.com>
2023-10-03 12:15:36 +00:00
..
README.md Add image path output to ar module (#1552) 2023-07-31 09:34:01 +00:00
main.tf Fix tests 2023-07-31 18:04:07 +02:00
outputs.tf Add image path output to ar module (#1552) 2023-07-31 09:34:01 +00:00
variables.tf update and refactor artifact registry module (#1536) 2023-07-28 09:54:36 +00:00
versions.tf Bump provider versions to v5.0.0 (#1724) 2023-10-03 12:15:36 +00:00

README.md

Google Cloud Artifact Registry Module

This module simplifies the creation of repositories using Google Cloud Artifact Registry.

Standard Repository

module "docker_artifact_registry" {
  source     = "./fabric/modules/artifact-registry"
  project_id = "myproject"
  location   = "europe-west1"
  name       = "myregistry"
  iam = {
    "roles/artifactregistry.admin" = ["group:cicd@example.com"]
  }
}
# tftest modules=1 resources=2

Remote and Virtual Repositories


module "registry-local" {
  source     = "./fabric/modules/artifact-registry"
  project_id = var.project_id
  location   = "europe-west1"
  name       = "local"
  format     = { python = {} }
}

module "registry-remote" {
  source     = "./fabric/modules/artifact-registry"
  project_id = var.project_id
  location   = "europe-west1"
  name       = "remote"
  format     = { python = {} }
  mode       = { remote = true }
}

module "registry-virtual" {
  source     = "./fabric/modules/artifact-registry"
  project_id = var.project_id
  location   = "europe-west1"
  name       = "virtual"
  format     = { python = {} }
  mode = {
    virtual = {
      remote = {
        repository = module.registry-remote.id
        priority   = 1
      }
      local = {
        repository = module.registry-local.id
        priority   = 10
      }
    }
  }
}

# tftest modules=3 resources=3 inventory=remote-virtual.yaml

Additional Docker and Maven Options


module "registry-docker" {
  source     = "./fabric/modules/artifact-registry"
  project_id = var.project_id
  location   = "europe-west1"
  name       = "docker"
  format = {
    docker = {
      immutable_tags = true
    }
  }
}

module "registry-maven" {
  source     = "./fabric/modules/artifact-registry"
  project_id = var.project_id
  location   = "europe-west1"
  name       = "maven"
  format = {
    maven = {
      allow_snapshot_overwrites = true
      version_policy            = "RELEASE"
    }
  }
}

# tftest modules=2 resources=2

Variables

name description type required default
location Registry location. Use `gcloud beta artifacts locations list' to get valid values. string
name Registry name. string
project_id Registry project id. string
description An optional description for the repository. string "Terraform-managed registry"
encryption_key The KMS key name to use for encryption at rest. string null
format Repository format. object({…}) { docker = {} }
iam IAM bindings in {ROLE => [MEMBERS]} format. map(list(string)) {}
labels Labels to be attached to the registry. map(string) {}
mode Repository mode. object({…}) { standard = true }

Outputs

name description sensitive
id Fully qualified repository id.
image_path Repository path for images.
name Repository name.