Skip to content

sparkfabrik/terraform-google-gcp-artifact-registry

Repository files navigation

Terraform GCP Artifact Registry

tflint status

This module enable Artifact Registry api in the GCP (Google Cloud Platform) project, create repositories and assign read and write IAM permissions.

You MUST configure the required "google" provider inside your root module.

This module is provided without any kind of warranty and is GPL3 licensed.

Providers

Name Version
google >= 5.26.0

Requirements

Name Version
terraform >= 1.3
google >= 5.26.0

Inputs

Name Description Type Default Required
artifact_registry_listers List of principals that can list Artifact Registry repositories. list(string) [] no
artifact_registry_listers_custom_role_name Name of the custom role for Artifact Registry listers. string "custom.artifactRegistryLister" no
default_location The default location for the Artifact Registry repositories. string "europe-west1" no
enable_api Enable the Artifact Registry API. bool true no
project_id The GCP project ID that hosts the Artifact Registry. string n/a yes
repositories List of Artifact Registry repositories to create.
map(object({
description = string
format = optional(string, "DOCKER")
mode = optional(string, "STANDARD_REPOSITORY")
cleanup_policy_dry_run = optional(bool, true)
docker_immutable_tags = optional(bool, true)
virtual_repository_config = optional(map(object({
repository = string
priority = optional(number, 0)
})), null)
remote_repository_config_docker = optional(object({
description = optional(string, "")
custom_repository_uri = string
disable_upstream_validation = optional(bool, false)
username_password_credentials_username = optional(string, "")
username_password_credentials_password_secret_version = optional(string, "")
}), null)
readers = optional(list(string), [])
writers = optional(list(string), [])
location = optional(string, "")
}))
n/a yes

Outputs

Name Description
custom_role_artifact_registry_lister_id The ID of the custom role for Artifact Registry listers. The role is created only if the list of Artifact Registry listers is not empty.
repositories The created Artifact Repository repositories.

Resources

Name Type
google_artifact_registry_repository.repositories resource
google_artifact_registry_repository_iam_member.member resource
google_project_iam_binding.artifact_registry_lister resource
google_project_iam_custom_role.artifact_registry_lister resource
google_project_service.project resource

Modules

No modules.