A Terraform module for provisioning and managing AWS Elastic Container Registry (ECR) repositories with advanced lifecycle policies.
terraform-aws-ecr is a Terraform module that provisions and manages AWS Elastic Container Registry (ECR) repositories. It automates the setup of secure, scalable Docker image storage with configurable lifecycle policies, access controls, and replication settings. The module solves the problem of manually configuring ECR through the AWS console or CLI, ensuring consistent and repeatable infrastructure deployment.
DevOps engineers, platform teams, and infrastructure developers who manage containerized applications on AWS using Terraform. It's particularly useful for organizations adopting GitOps or infrastructure-as-code practices.
Developers choose this module because it encapsulates AWS ECR best practices, reduces boilerplate Terraform code, and integrates with Cloud Posse's ecosystem for standardized labeling and tooling. Its advanced features like tag mutability exclusions and custom lifecycle rules provide finer control than basic Terraform resources.
Terraform Module to manage Docker Container Registries on AWS ECR
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports custom lifecycle rules including transitioning images to archive storage for cost-effective retention, as demonstrated in the custom_lifecycle_rules example with 'transition' action.
Allows defining full, push, or read-only access for AWS principals and organizations via inputs like principals_full_access and organizations_readonly_access, with detailed IAM policy document generation.
Offers image_tag_mutability with exclusion filters for specific tag patterns (e.g., 'latest' or 'dev-*'), enabling immutable repositories with controlled exceptions as shown in the advanced usage example.
Can create one or multiple ECR repositories with shared configurations using the image_names list, reducing boilerplate Terraform code for bulk management.
With over 40 input variables and dependencies on Cloud Posse's labeling module, the setup can be overwhelming for basic ECR needs, requiring significant configuration effort.
Deeply integrates with Cloud Posse's tools like Atmos and their labeling conventions, which may not align with teams using different Terraform practices or preferring vendor-neutral modules.
Requires AWS provider >=6.8.0 for features like image_tag_mutability_exclusion_filter, potentially forcing upgrades in existing Terraform configurations and causing compatibility issues.