{"id":47590982,"url":"https://github.com/sourcefuse/terraform-aws-arc-ecr","last_synced_at":"2026-04-01T17:26:00.829Z","repository":{"id":345273403,"uuid":"1068994171","full_name":"sourcefuse/terraform-aws-arc-ecr","owner":"sourcefuse","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-18T10:44:07.000Z","size":3873,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-19T01:44:34.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcefuse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-03T08:31:27.000Z","updated_at":"2026-03-18T10:43:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sourcefuse/terraform-aws-arc-ecr","commit_stats":null,"previous_names":["sourcefuse/terraform-aws-arc-ecr"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sourcefuse/terraform-aws-arc-ecr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-ecr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-ecr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-ecr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-ecr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcefuse","download_url":"https://codeload.github.com/sourcefuse/terraform-aws-arc-ecr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcefuse%2Fterraform-aws-arc-ecr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-01T17:26:00.043Z","updated_at":"2026-04-01T17:26:00.813Z","avatar_url":"https://github.com/sourcefuse.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Module Structure](./static/ecr.png)\n\n# [terraform-aws-arc-ecr](https://github.com/sourcefuse/terraform-aws-arc-ecr)\n\n\u003ca href=\"https://github.com/sourcefuse/terraform-aws-arc-ecr/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/sourcefuse/terraform-aws-arc-ecr.svg?style=for-the-badge\" alt=\"Latest Release\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/sourcefuse/terraform-aws-arc-ecr/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/sourcefuse/terraform-aws-arc-ecr.svg?style=for-the-badge\" alt=\"Last Updated\"/\u003e\u003c/a\u003e ![Terraform](https://img.shields.io/badge/terraform-%235835CC.svg?style=for-the-badge\u0026logo=terraform\u0026logoColor=white) ![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge\u0026logo=githubactions\u0026logoColor=white)\n\n[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=sourcefuse_terraform-aws-arc-ecr\u0026token=470128924743a0aace992ff0eb4f2460199e267f)](https://sonarcloud.io/summary/new_code?id=sourcefuse_terraform-aws-arc-ecr)\n\n## Overview\n\nSourceFuse AWS Reference Architecture (ARC) Terraform module for managing the ECR module.\n\n## Features\n\n- **Complete ECR Management**: Support for all ECR resource types\n- **Conditional Resource Creation**: Create only the resources you need\n- **Security Best Practices**: Encryption, scanning, and least-privilege policies\n- **Multi-Region Replication**: Cross-region and cross-account replication support\n- **Lifecycle Management**: Automated image cleanup policies\n- **Pull-Through Cache**: Cache public registry images\n- **Flexible Tagging**: Consistent tagging across all resources\n- **Production Ready**: Follows AWS Well-Architected principles\n\n## Usage\n\n```hcl\nmodule \"ecr\" {\n  source      = \"sourcefuse/arc-ecr/aws\"\n  version     = \"0.0.1\"\n\n  # Basic Configuration\n  repositories = {\n    \"my-app\" = {\n      image_tag_mutability = \"MUTABLE\"\n      scan_on_push        = true\n      encryption_type     = \"KMS\"\n      kms_key_id         = \"alias/ecr-key\"\n    }\n  }\n\n  # Optional Features\n\n  replication_configuration = {\n    enabled = true\n    rules   = [\n      {\n        destinations = [\n          {\n            region      = \"us-east-1\"\n            registry_id = \"123456789012\"\n          }\n        ]\n        repository_filters = [\n          {\n            filter      = \"my-app\"\n            filter_type = \"PREFIX_MATCH\"\n          }\n        ]\n      }\n    ]\n  }\n\n  # Tagging\n  tags = {\n    Environment = \"production\"\n    Team        = \"platform\"\n    Project     = \"container-registry\"\n  }\n}\n```\n\n## Examples\n\n- [Basic ECR Repository](./examples/basic-repository/)\n- [Comprehensive Repository](./examples/comprehensive-repository/)\n- [ECR with Lifecycle Policy](./examples/lifecycle-policy/)\n- [ECR with Repository Policy](./examples/repository-policy/)\n- [ECR with Replication](./examples/replication/)\n- [ECR with Pull-Through Cache](./examples/pull-through-cache/)\n- [ECR with Registry Scanning](./examples/registry-scanning/)\n- [ECR with Repository Creation Template](./examples/repository-template/)\n\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.5.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 5.0, \u003c 7.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | 6.15.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_ecr_account_setting.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_account_setting) | resource |\n| [aws_ecr_lifecycle_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_lifecycle_policy) | resource |\n| [aws_ecr_pull_through_cache_rule.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_pull_through_cache_rule) | resource |\n| [aws_ecr_registry_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_registry_policy) | resource |\n| [aws_ecr_registry_scanning_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_registry_scanning_configuration) | resource |\n| [aws_ecr_replication_configuration.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_replication_configuration) | resource |\n| [aws_ecr_repository.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository) | resource |\n| [aws_ecr_repository_creation_template.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository_creation_template) | resource |\n| [aws_ecr_repository_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository_policy) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_account_setting\"\u003e\u003c/a\u003e [account\\_setting](#input\\_account\\_setting) | ECR account setting | \u003cpre\u003eobject({\u003cbr/\u003e    name  = string\u003cbr/\u003e    value = string\u003cbr/\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr/\u003e  \"name\": null,\u003cbr/\u003e  \"value\": null\u003cbr/\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_pull_through_cache_rules\"\u003e\u003c/a\u003e [pull\\_through\\_cache\\_rules](#input\\_pull\\_through\\_cache\\_rules) | Pull through cache rules | \u003cpre\u003emap(object({\u003cbr/\u003e    ecr_repository_prefix      = string\u003cbr/\u003e    upstream_registry_url      = string\u003cbr/\u003e    credential_arn             = optional(string)\u003cbr/\u003e    custom_role_arn            = optional(string)\u003cbr/\u003e    upstream_repository_prefix = optional(string)\u003cbr/\u003e  }))\u003c/pre\u003e | `{}` | no |\n| \u003ca name=\"input_registry_policy\"\u003e\u003c/a\u003e [registry\\_policy](#input\\_registry\\_policy) | Registry policy JSON | `string` | `null` | no |\n| \u003ca name=\"input_registry_scanning_configuration\"\u003e\u003c/a\u003e [registry\\_scanning\\_configuration](#input\\_registry\\_scanning\\_configuration) | Registry scanning configuration | \u003cpre\u003eobject({\u003cbr/\u003e    enabled   = bool\u003cbr/\u003e    scan_type = optional(string, \"ENHANCED\")\u003cbr/\u003e    rules = optional(list(object({\u003cbr/\u003e      scan_frequency = string\u003cbr/\u003e      repository_filters = list(object({\u003cbr/\u003e        filter      = string\u003cbr/\u003e        filter_type = string\u003cbr/\u003e      }))\u003cbr/\u003e    })), [])\u003cbr/\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr/\u003e  \"enabled\": false,\u003cbr/\u003e  \"rules\": [],\u003cbr/\u003e  \"scan_type\": \"ENHANCED\"\u003cbr/\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_replication_configuration\"\u003e\u003c/a\u003e [replication\\_configuration](#input\\_replication\\_configuration) | Replication configuration for ECR registry | \u003cpre\u003eobject({\u003cbr/\u003e    enabled = bool # Enable replication configuration\u003cbr/\u003e    rules = list(object({\u003cbr/\u003e      destinations = list(object({\u003cbr/\u003e        region      = string\u003cbr/\u003e        registry_id = string\u003cbr/\u003e      }))\u003cbr/\u003e      repository_filters = optional(list(object({\u003cbr/\u003e        filter      = string\u003cbr/\u003e        filter_type = string\u003cbr/\u003e      })), [])\u003cbr/\u003e    }))\u003cbr/\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr/\u003e  \"enabled\": false,\u003cbr/\u003e  \"rules\": []\u003cbr/\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_repositories\"\u003e\u003c/a\u003e [repositories](#input\\_repositories) | Map of ECR repositories to create | \u003cpre\u003emap(object({\u003cbr/\u003e    force_delete         = optional(bool, false)\u003cbr/\u003e    image_tag_mutability = optional(string, \"MUTABLE\")\u003cbr/\u003e    encryption_type      = optional(string, \"AES256\")\u003cbr/\u003e    kms_key              = optional(string)\u003cbr/\u003e    scan_on_push         = optional(bool, true)\u003cbr/\u003e    lifecycle_policy     = optional(string)\u003cbr/\u003e    repository_policy    = optional(string)\u003cbr/\u003e    repository_tags      = optional(map(string), {})\u003cbr/\u003e    image_tag_mutability_exclusion_filters = optional(list(object({\u003cbr/\u003e      filter      = string\u003cbr/\u003e      filter_type = string\u003cbr/\u003e    })), [])\u003cbr/\u003e  }))\u003c/pre\u003e | `{}` | no |\n| \u003ca name=\"input_repository_creation_template\"\u003e\u003c/a\u003e [repository\\_creation\\_template](#input\\_repository\\_creation\\_template) | Repository creation template configuration | \u003cpre\u003eobject({\u003cbr/\u003e    prefix               = string\u003cbr/\u003e    applied_for          = list(string)\u003cbr/\u003e    custom_role_arn      = optional(string)\u003cbr/\u003e    description          = optional(string)\u003cbr/\u003e    encryption_type      = optional(string, \"AES256\")\u003cbr/\u003e    kms_key              = optional(string)\u003cbr/\u003e    image_tag_mutability = optional(string, \"MUTABLE\")\u003cbr/\u003e    lifecycle_policy     = optional(string)\u003cbr/\u003e    repository_policy    = optional(string)\u003cbr/\u003e    resource_tags        = optional(map(string), {})\u003cbr/\u003e    image_tag_mutability_exclusion_filters = optional(list(object({\u003cbr/\u003e      filter      = string\u003cbr/\u003e      filter_type = string\u003cbr/\u003e    })), [])\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Tags to apply to all resources | `map(string)` | `{}` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_pull_through_cache_rule_registry_ids\"\u003e\u003c/a\u003e [pull\\_through\\_cache\\_rule\\_registry\\_ids](#output\\_pull\\_through\\_cache\\_rule\\_registry\\_ids) | Registry IDs from pull through cache rules |\n| \u003ca name=\"output_registry_id\"\u003e\u003c/a\u003e [registry\\_id](#output\\_registry\\_id) | Registry ID |\n| \u003ca name=\"output_replication_configuration_registry_id\"\u003e\u003c/a\u003e [replication\\_configuration\\_registry\\_id](#output\\_replication\\_configuration\\_registry\\_id) | Registry ID from replication configuration |\n| \u003ca name=\"output_repository_arns\"\u003e\u003c/a\u003e [repository\\_arns](#output\\_repository\\_arns) | ARNs of the ECR repositories |\n| \u003ca name=\"output_repository_creation_template_registry_id\"\u003e\u003c/a\u003e [repository\\_creation\\_template\\_registry\\_id](#output\\_repository\\_creation\\_template\\_registry\\_id) | Registry ID from repository creation template |\n| \u003ca name=\"output_repository_names\"\u003e\u003c/a\u003e [repository\\_names](#output\\_repository\\_names) | Names of the ECR repositories |\n| \u003ca name=\"output_repository_registry_ids\"\u003e\u003c/a\u003e [repository\\_registry\\_ids](#output\\_repository\\_registry\\_ids) | Registry IDs of the ECR repositories |\n| \u003ca name=\"output_repository_urls\"\u003e\u003c/a\u003e [repository\\_urls](#output\\_repository\\_urls) | URLs of the ECR repositories |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Development\n\n### Prerequisites\n\n- [terraform](https://learn.hashicorp.com/terraform/getting-started/install#installing-terraform)\n- [terraform-docs](https://github.com/segmentio/terraform-docs)\n- [pre-commit](https://pre-commit.com/#install)\n- [golang](https://golang.org/doc/install#install)\n- [golint](https://github.com/golang/lint#installation)\n\n### Configurations\n\n- Configure pre-commit hooks\n  ```sh\n  pre-commit install\n  ```\n\n### Versioning\n\nwhile Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch\n\nFor Example\n\n```sh\ngit commit -m \"your commit message #major\"\n```\nBy specifying this , it will bump the version and if you don't specify this in your commit message then by default it will consider patch and will bump that accordingly\n\n## Authors\n\nThis project is authored by:\n- SourceFuse ARC Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-ecr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-ecr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcefuse%2Fterraform-aws-arc-ecr/lists"}