{"id":26959346,"url":"https://github.com/tmknom/terraform-aws-ecr","last_synced_at":"2025-09-09T21:32:27.825Z","repository":{"id":48594500,"uuid":"158726942","full_name":"tmknom/terraform-aws-ecr","owner":"tmknom","description":"Terraform module which creates ECR resources on AWS.","archived":false,"fork":false,"pushed_at":"2021-04-22T11:37:34.000Z","size":56,"stargazers_count":10,"open_issues_count":2,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-15T19:38:05.787Z","etag":null,"topics":["aws","ecr","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"","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/tmknom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-22T16:37:57.000Z","updated_at":"2023-08-15T19:38:05.788Z","dependencies_parsed_at":"2022-08-27T21:23:34.706Z","dependency_job_id":null,"html_url":"https://github.com/tmknom/terraform-aws-ecr","commit_stats":null,"previous_names":[],"tags_count":5,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fterraform-aws-ecr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fterraform-aws-ecr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fterraform-aws-ecr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmknom%2Fterraform-aws-ecr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmknom","download_url":"https://codeload.github.com/tmknom/terraform-aws-ecr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246939173,"owners_count":20857916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws","ecr","terraform","terraform-module"],"created_at":"2025-04-03T04:37:33.884Z","updated_at":"2025-04-03T04:37:34.549Z","avatar_url":"https://github.com/tmknom.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-ecr\n\n[![Terraform Actions Status](https://github.com/tmknom/terraform-aws-ecr/workflows/Terraform/badge.svg)](https://github.com/tmknom/terraform-aws-ecr/actions?query=workflow%3ATerraform)\n[![Markdown Actions Status](https://github.com/tmknom/terraform-aws-ecr/workflows/Markdown/badge.svg)](https://github.com/tmknom/terraform-aws-ecr/actions?query=workflow%3AMarkdown)\n[![YAML Actions Status](https://github.com/tmknom/terraform-aws-ecr/workflows/YAML/badge.svg)](https://github.com/tmknom/terraform-aws-ecr/actions?query=workflow%3AYAML)\n[![JSON Actions Status](https://github.com/tmknom/terraform-aws-ecr/workflows/JSON/badge.svg)](https://github.com/tmknom/terraform-aws-ecr/actions?query=workflow%3AJSON)\n[![GitHub tag](https://img.shields.io/github/tag/tmknom/terraform-aws-ecr.svg)](https://registry.terraform.io/modules/tmknom/ecr/aws)\n[![License](https://img.shields.io/github/license/tmknom/terraform-aws-ecr.svg)](https://opensource.org/licenses/Apache-2.0)\n\nTerraform module which creates ECR resources on AWS.\n\n## Description\n\nProvision [ECR Repository](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html),\n[Repository Policy](https://docs.aws.amazon.com/AmazonECR/latest/userguide/RepositoryPolicies.html) and\n[Lifecycle Policy](https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html).\n\nThis module provides recommended settings:\n\n- Enable cross account access\n- Automation of cleaning up unused images\n\n## Usage\n\n### Minimal\n\n```hcl\nmodule \"ecr\" {\n  source          = \"git::https://github.com/tmknom/terraform-aws-ecr.git?ref=tags/2.3.0\"\n  name            = \"minimal\"\n  tag_prefix_list = [\"release\"]\n}\n```\n\n### Complete\n\n```hcl\nmodule \"ecr\" {\n  source               = \"git::https://github.com/tmknom/terraform-aws-ecr.git?ref=tags/2.3.0\"\n  name                 = \"complete\"\n  tag_prefix_list      = [\"release\"]\n  scan_on_push         = true\n  image_tag_mutability = \"IMMUTABLE\"\n\n  only_pull_accounts       = [\"123456789012\"]\n  push_and_pull_accounts   = [\"111111111111\"]\n  max_untagged_image_count = 5\n  max_tagged_image_count   = 50\n}\n```\n\n## Examples\n\n- [Minimal](https://github.com/tmknom/terraform-aws-ecr/tree/master/examples/minimal)\n- [Complete](https://github.com/tmknom/terraform-aws-ecr/tree/master/examples/complete)\n\n\u003c!-- BEGINNING OF GENERATED BY TERRAFORM-DOCS --\u003e\n\n## Requirements\n\n| Name      | Version |\n| --------- | ------- |\n| terraform | \u003e= 0.12 |\n\n## Providers\n\n| Name | Version |\n| ---- | ------- |\n| aws  | n/a     |\n\n## Inputs\n\n| Name                     | Description                                                                  | Type           | Default     | Required |\n| ------------------------ | ---------------------------------------------------------------------------- | -------------- | ----------- | :------: |\n| name                     | Name of the repository.                                                      | `string`       | n/a         |   yes    |\n| tag_prefix_list          | List of image tag prefixes on which to take action with lifecycle policy.    | `list(string)` | n/a         |   yes    |\n| image_tag_mutability     | Whether images are allowed to overwrite existing tags.                       | `string`       | `\"MUTABLE\"` |    no    |\n| max_tagged_image_count   | The maximum number of tagged images that you want to retain in repository.   | `number`       | `30`        |    no    |\n| max_untagged_image_count | The maximum number of untagged images that you want to retain in repository. | `number`       | `1`         |    no    |\n| only_pull_accounts       | AWS accounts which pull only.                                                | `list(string)` | `[]`        |    no    |\n| push_and_pull_accounts   | AWS accounts which push and pull.                                            | `list(string)` | `[]`        |    no    |\n| scan_on_push             | Whether images should automatically be scanned on push or not.               | `bool`         | `false`     |    no    |\n\n## Outputs\n\n| Name                       | Description                                                                                        |\n| -------------------------- | -------------------------------------------------------------------------------------------------- |\n| ecr_repository_arn         | Full ARN of the repository.                                                                        |\n| ecr_repository_name        | The name of the repository.                                                                        |\n| ecr_repository_registry_id | The registry ID where the repository was created.                                                  |\n| ecr_repository_url         | The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName) |\n\n\u003c!-- END OF GENERATED BY TERRAFORM-DOCS --\u003e\n\n## Development\n\n### Development Requirements\n\n- [Docker](https://www.docker.com/)\n\n### Configure environment variables\n\n```shell\nexport AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE\nexport AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\nexport AWS_DEFAULT_REGION=ap-northeast-1\n```\n\n### Installation\n\n```shell\ngit clone git@github.com:tmknom/terraform-aws-ecr.git\ncd terraform-aws-ecr\nmake install\n```\n\n### Makefile targets\n\n```text\napply-complete                 Run terraform apply examples/complete\napply-minimal                  Run terraform apply examples/minimal\nbump-version                   Bump version (Required argument 'VERSION')\ncheck-format                   Check format code\nclean                          Clean .terraform\ndestroy-complete               Run terraform destroy examples/complete\ndestroy-minimal                Run terraform destroy examples/minimal\ndiff                           Word diff\ndocs                           Generate docs\nformat                         Format code\nhelp                           Show help\ninstall                        Install requirements\nlint                           Lint code\nplan-complete                  Run terraform plan examples/complete\nplan-minimal                   Run terraform plan examples/minimal\nrelease                        Release GitHub and Terraform Module Registry\nupgrade                        Upgrade makefile\n```\n\n### Releasing new versions\n\nBump VERSION file, and run `make release`.\n\n### Terraform Module Registry\n\n- \u003chttps://registry.terraform.io/modules/tmknom/ecr/aws\u003e\n\n## License\n\nApache 2 Licensed. See LICENSE for full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmknom%2Fterraform-aws-ecr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmknom%2Fterraform-aws-ecr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmknom%2Fterraform-aws-ecr/lists"}