Skip to content

schubergphilis/terraform-aws-mcaf-ecr

Repository files navigation

terraform-aws-mcaf-ecr

Terraform module to setup and manage AWS Elastic Container Registry (ECR) repositories.

IMPORTANT: We do not pin modules to versions in our examples. We highly recommend that in your code you pin the version to the exact version you are using so that your infrastructure remains stable.

Requirements

Name Version
terraform >= 0.13
aws >= 4.0.0

Providers

Name Version
aws >= 4.0.0

Modules

No modules.

Resources

Name Type
aws_ecr_lifecycle_policy.default resource
aws_ecr_repository.default resource
aws_ecr_repository_policy.default resource
aws_iam_policy_document.default data source

Inputs

Name Description Type Default Required
repository_names list of repository names, names can include namespaces: prefixes ending with a slash (/) list(string) n/a yes
additional_ecr_policy_statements Map of additional ecr repository policy statements
map(object({
effect = string
principal = object({
type = string
identifiers = list(string)
})
actions = list(string)
condition = optional(list(object({
test = string
variable = string
values = list(string)
})), [])
}))
null no
custom_lifecycle_policy_rules JSON definition of custom policy Rules, this will disable the default policy string null no
enable_lifecycle_policy Set to false to prevent the module from adding any lifecycle policies to any repositories bool true no
force_delete When deleting a repository, force the deletion if it is not empty bool false no
image_tag_mutability The tag mutability setting for the repository. Must be: MUTABLE or IMMUTABLE string "IMMUTABLE" no
kms_key_arn The KMS key ARN used for the repository encryption string null no
principals_readonly_access Principal ARNs to provide with readonly access to the ECR list(string) [] no
repository_tags Mapping of tags for a repository using repository name as key map(map(string)) {} no
scan_images_on_push Indicates if images are automatically scanned after being pushed to the repository bool true no
tags Mapping of tags map(string) {} no

Outputs

Name Description
arns n/a
repository_url n/a

Licensing

100% Open Source and licensed under the Apache License Version 2.0. See LICENSE for full details.