AWS ECR terraform Module

Terraform module to provision an AWS ECR Docker Container registry.


Miminal setup

If you want to create a ECR repository with Default configuration, use the module like this:

module "ecr" {
  source      = ""
  version     = "0.2.2"
  identifier  = "example"

For more details on a working minimal example, please visit examples/simple

Advanced Setup

If you want to create a ECR repository with your custom configuration, you can provide some additional parameters:

module "ecr" {
  source                  = ""
  version                 = "0.2.2"
  identifier              = "example"
  scan_on_push            = false
  image_tag_mutability    = "IMMUTABLE"
  tags = {
      Cost_Center = "XYZ"

For more details on a complete working example, please visit examples/advanced


Here are some working examples of using this module:


Name Version
terraform >= 0.12


Name Version
aws n/a


Name Description Type Default Required
append_workspace Appends the terraform workspace at the end of resource names, - bool true no
identifier (Required) Name of the repository string n/a yes
image_tag_mutability (Optional) The tag mutability setting for the repository. Must be one of: MUTABLE or IMMUTABLE. Defaults to MUTABLE string "MUTABLE" no
scan_on_push (Optional) Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false). Defaults to true bool true no
tags (Optional) A map of tags to assign to the resource map {} no
encryption_type (Optional) The encryption type to use for the repository. string AES254 no
kms_key (Optional) The ARN of the KMS key to use when encryption_type is KMS. string null no


Name Description
output n/a


If you want to contribute to this repository check all the guidelines specified here before submitting a new PR.