ecr

cloudposse/ecr/aws

Terraform Module HCL AWS

Terraform Module to manage Docker Container Registries on AWS ECR

Install
module "ecr" {
source = "cloudposse/ecr/aws"
version = "1.0.1"
}
plain text: /constructs/tfmod-cloudposse-ecr-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform module to provision an AWS ECR Docker Container registry. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Usage The module creates one or more Elastic Container Registry (ECR) repositories. All repositories created will share the same configuration. Use this module multiple times to create repositories with different configurations. If you provide 1 or more names in image_names then one repository will be created for each of the names you provide. Those names can include "namespaces", which are just prefixes ending w

Inputs (42)
NameTypeDescriptionDefault
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
time_based_rotationboolSet to true to filter image based on the `sinceImagePushed` count type.false
image_nameslist(string)List of Docker local image names, used as repository names for AWS ECR []
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
principals_push_accesslist(string)Principal ARNs to provide with push access to the ECR[]
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
principals_readonly_accesslist(string)Principal ARNs to provide with readonly access to the ECR[]
principals_pull_though_accesslist(string)Principal ARNs to provide with pull though access to the ECR[]
image_tag_mutabilitystringThe tag mutability setting for the repository. Must be one of: `MUTABLE`, `IMMUT"IMMUTABLE"
protected_tags_keep_countnumberNumber of Image versions to keep for protected tags999999
force_deleteboolWhether to delete the repository even if it contains imagesfalse
prefixes_pull_through_repositorieslist(string)Organization IDs to provide with push access to the ECR[]
max_image_countnumberHow many Docker Image versions AWS ECR will store500
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
use_fullnameboolSet 'true' to use `namespace-stage-name` for ecr repository name, else `name`true
replication_configurationslist(object({ rules = listReplication configuration for a registry. See [Replication Configuration](https:[]
organizations_readonly_accesslist(string)Organization IDs to provide with readonly access to the ECR.[]
… and 2 more inputs
Outputs (6)
repository_name — Name of first repository created
repository_url — URL of first repository created
repository_arn — ARN of first repository created
repository_url_map — Map of repository names to repository URLs
repository_arn_map — Map of repository names to repository ARNs
registry_id — Registry ID
Resources (4)
aws_ecr_lifecycle_policyaws_ecr_replication_configurationaws_ecr_repositoryaws_ecr_repository_policy
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.1
Cloud AWS
★ Stars188
Forks133
Total downloads2.6M
Inputs42
Outputs6
Resources4
Examples4
Submodules1
LicenseApache-2.0
Namespacecloudposse
Updated