https://github.com/techservicesillinois/terraform-aws-ecr
Provides an EC2 Container Registry repository
https://github.com/techservicesillinois/terraform-aws-ecr
Last synced: 2 months ago
JSON representation
Provides an EC2 Container Registry repository
- Host: GitHub
- URL: https://github.com/techservicesillinois/terraform-aws-ecr
- Owner: techservicesillinois
- License: mit
- Created: 2018-10-25T19:50:40.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T18:13:05.000Z (almost 2 years ago)
- Last Synced: 2024-09-09T22:27:24.645Z (almost 2 years ago)
- Language: Gherkin
- Size: 29.3 KB
- Stars: 1
- Watchers: 12
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ecr
[](https://github.com/techservicesillinois/terraform-aws-ecr/actions)
Provides an [Elastic Container Registry repository](https://docs.aws.amazon.com/AmazonECR/latest/userguide/ECR_GetStarted.html). In addition, it provides an optional default lifecycle
policy.
[Cross-account](https://aws.amazon.com/premiumsupport/knowledge-center/secondary-account-access-ecr/)
access may be enabled by setting the `readers` or `writers` arguments.
Example Usage
-----------------
```hcl
module "foo" {
source = "git@github.com:techservicesillinois/terraform-aws-ecr"
lambda_arns = ["arn:aws:lambda:us-east-1: 874445906176:function:*"]
repos = [
"repo_name_1",
"repo_name_2",
]
readers = ["arn:aws:iam::874445906176:root"]
scan_on_push = true
}
```
Argument Reference
-----------------
The following arguments are supported:
* `disable_lifecycle_policy` - (Optional) If set to 'true', no lifecycle policy is applied. Default is 'false'.
* `lambda_arns` – (Optional) List of lambda function ARNs that can pull images at launch.
* `lifecycle_policy_path` – (Optional) Path to JSON document containing lifecycle policy.
* `readers` - (Optional) List of account ARNs that can pull images. These accounts are also granted describe and list access to the corresponding repo(s) and images.
* `repos` - (Required) List of repository names.
* `scan_on_push` – (Optional) Boolean indicating whether images are scanned after being pushed to the repository. Defaults to `true`.
* `tags` - (Optional) Map of tags for resources where supported.
* `writers` - (Optional) List of account ARNs that can push images.
### Debugging
* `_debug` - (Optional) If set, produce verbose output for debugging.
Attributes Reference
--------------------
The following attribute is exported:
* `repos` - Map wherein each key/value pair consists of a repo name and URL.