Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

GovTechSG/terraform-aws-ecr

Repository files navigation

terraform-aws-ecr

This module creates an private ECR

Usage

module "test" {
  source = "../../"
  repo_names = {
    "my-repo" : "my-repo",
  }
  image_tag_mutability = "IMMUTABLE"

  allowed_account_arns = {
    "my-account" : "\"arn:aws:iam::123456789:root\"",
  }
}

Requirements

Name Version
terraform >= 0.13

Providers

Name Version
aws n/a

Resources

Name Type
aws_ecr_lifecycle_policy.lifecycle resource
aws_ecr_repository.repo resource
aws_ecr_repository_policy.policy resource

Inputs

Name Description Type Default Required
allowed_account_arns Map of account IDs with permission to ECR repos map(string) n/a yes
image_tag_mutability Whether image tags can be mutated or not string "IMMUTABLE" no
max_days_for_untagged_images Maximum days to keep untagged images in repository number 14 no
project_tags Tagging of ECR repository map(string)
{
"Terraform": "True"
}
no
repo_names Name of ECR repository map(string) n/a yes
scan_on_push Scan container images on push bool true no

Outputs

Name Description
ecr ECR repository name

Requirements

Name Version
terraform >= 0.13

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_ecr_lifecycle_policy.lifecycle resource
aws_ecr_pull_through_cache_rule.main resource
aws_ecr_repository.repo resource
aws_ecr_repository_policy.policy resource

Inputs

Name Description Type Default Required
allowed_account_arns Map of account IDs with permission to ECR repos map(string) n/a yes
image_tag_mutability Whether image tags can be mutated or not string "IMMUTABLE" no
max_days_for_untagged_images Maximum days to keep untagged images in repository number 14 no
project_tags Tagging of ECR repository map(string)
{
"Terraform": "True"
}
no
pull_through_cache_rules Use a prefix to pull through from a 3rd party upstream registry. map(map(string)) n/a yes
repo_names Name of ECR repository map(string) n/a yes
scan_on_push Scan container images on push bool true no
tags n/a map(string) {} no

Outputs

Name Description
ecr ECR repository name

Releases

No releases published

Packages

No packages published

Languages