ecr-repo

dod-iac/ecr-repo/aws

Terraform Module HCL AWS

An AWS ECR repository

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

Usage Creates an AWS ECR repository. ``hcl module "ecr_repo" { source = "dod-iac/ecr-repo/aws" name = format("app-%s-%s", var.application, var.environment) tags = { Application = var.application Automation = "Terraform" } } ` Creates an AWS ECR repository with container images encrypted using a customer-managed KMS key. `hcl module "ecr_kms_key" { source = "dod-iac/ecr-kms-key/aws" name = format("alias/app-%s-ecr", var.application, var.environment) tags = { Application = var.application Automation = "Terraform" } } module "ecr_repo" { source = "dod-iac/ecr-repo/aws" encryption_type = "KMS" kms_key_arn = module.ecr_kms_key.aws_kms_key_arn name = format("app-%s", var.application) tags = { Application = var.application Automation = "Terraform" } } ` Use the optional lifecycle_policy variable

Inputs (8)
NameTypeDescriptionDefault
namestringName of the repository. required
kms_key_arnstringThe ARN of the KMS key to used to encrypt the container images.""
lifecycle_policystringOptional lifecycle policy for the ECR repository.""
repository_policystringOptional repository policy for the ECR repository.""
scan_on_pushboolIndicates whether images are scanned after being pushed to the repository (true)true
tagsmap(string)A mapping of tags to assign to the ECR repo.{}
encryption_typestringThe encryption type to use for the repository. Valid values are AES256 or KMS."AES256"
immutableboolIf true, image tags are immutable.false
Outputs (2)
arn — The Amazon Resource Name (ARN) of the AWS ECR repo.
repository_url — The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
Resources (3)
aws_ecr_lifecycle_policyaws_ecr_repositoryaws_ecr_repository_policy
Topics & Tags
terraformawsecr
Details
FrameworkTerraform Module
LanguageHCL
Version1.1.2
Cloud AWS
★ Stars1
Forks5
Total downloads8.2k
Inputs8
Outputs2
Resources3
LicenseNOASSERTION
Namespacedod-iac
Updated