Skip to content

dapperlabs-platform/terraform-google-artifact-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Cloud Artifact Registry Module

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

Note: Artifact Registry is still in beta, hence this module currently uses the beta provider.

Example

module "docker_artifact_registry" {
  source     = "github.com/dapperlabs-platform/terraform-google-artifact-registry?ref=tag"
  project_id = "myproject"
  location   = "europe-west1"
  format     = "DOCKER"
  id         = "myregistry"
  iam = {
    "roles/artifactregistry.admin" = ["group:[email protected]"]
  }
}
# tftest:modules=1:resources=2

Copyright 2021 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Requirements

Name Version
terraform >= 0.12.6

Providers

Name Version
google-beta n/a

Modules

No modules.

Resources

Name Type
google-beta_google_artifact_registry_repository.registry resource
google-beta_google_artifact_registry_repository_iam_binding.bindings resource
google-beta_google_artifact_registry_repository_iam_member.bindings_member resource

Inputs

Name Description Type Default Required
cleanup_policies Object containing details about the cleanup policies for an Artifact Registry repository.
map(object({
action = string
condition = optional(object({
tag_state = optional(string)
tag_prefixes = optional(list(string))
older_than = optional(string)
newer_than = optional(string)
package_name_prefixes = optional(list(string))
version_name_prefixes = optional(list(string))
}))
most_recent_versions = optional(object({
package_name_prefixes = optional(list(string))
keep_count = optional(number)
}))
}))
null no
cleanup_policy_dry_run If true, the cleanup pipeline is prevented from deleting versions in this repository. bool null no
description An optional description for the repository string "Terraform-managed registry" no
encryption_key The KMS key name to use for encryption at rest. string null no
format Repository format. One of DOCKER or UNSPECIFIED string "DOCKER" no
iam IAM bindings in {ROLE => [MEMBERS]} format. map(list(string)) {} no
iam_additive IAM additive bindings in {ROLE => [MEMBERS]} format. map(list(string)) {} no
id Repository id string n/a yes
labels Labels to be attached to the registry. map(string) {} no
location Registry location. Use gcloud beta artifacts locations list' to get valid values string "" no
mode Repository mode. One of STANDARD_REPOSITORY, VIRTUAL_REPOSITORY, or REMOTE_REPOSITORY string "STANDARD_REPOSITORY" no
project_id Registry project id. string n/a yes

Outputs

Name Description
id Repository id
name Repository name