Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 4.17 KB

README.md

File metadata and controls

67 lines (52 loc) · 4.17 KB

terraform-aws-ecr

This module is used to create AWS Elastic Containers Repositories and apply policies on them and their replicas.

Usage

Use the module

module "ecr" {
  source = "./"

  name = "repositoryName"
}

Requirements

Name Version
terraform ~> 1.0
aws ~> 3.0
null ~> 3.1.0

Providers

Name Version
aws ~> 3.0
null ~> 3.1.0

Resources

Name Type
aws_ecr_lifecycle_policy.lifecycle_policy resource
aws_ecr_repository.repository resource
aws_ecr_repository_policy.repository_policy resource
null_resource.replicate_lifecycle_policy resource
null_resource.replicate_repository_policy resource
aws_region.current data source

Inputs

Name Description Type Default Required
name Name of the repository. string n/a yes
encryption_type The encryption type to use for the repository. Valid values are AES256 or KMS. string "AES256" no
image_tag_mutability Tag mutability setting for the repository. bool false no
kms_key ARN of the KMS key to use when encryption_type is KMS. If not specified, uses the default AWS managed key for ECR. string null no
lifecycle_policy Policy document. This is a JSON formatted string. See more details about Policy Parameters in the official AWS docs. string "" no
replicated_region List of region in wich the repository is replicated. list(string) [] no
repository_policy Policy document. This is a JSON formatted string. For more information about building IAM policy documents with Terraform, see the AWS IAM Policy Document Guide. string "" no
role_to_assume The ARN of the role to assume when replicating repositories. string null no
scan_on_push Indicates whether images are scanned after being pushed to the repository. bool true no
tags map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. map(string) {} no

Outputs

Name Description
arn Full ARN of the repository.
repository_url URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).