https://github.com/govtechsg/terraform-aws-ecr
AWS ECR Module
https://github.com/govtechsg/terraform-aws-ecr
ace
Last synced: about 1 year ago
JSON representation
AWS ECR Module
- Host: GitHub
- URL: https://github.com/govtechsg/terraform-aws-ecr
- Owner: GovTechSG
- License: mit
- Created: 2021-06-18T07:14:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-31T03:29:13.000Z (about 4 years ago)
- Last Synced: 2024-04-14T23:19:53.835Z (about 2 years ago)
- Topics: ace
- Language: HCL
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 60
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-aws-ecr
This module creates an private ECR
## Usage
```hcl
module "test" {
source = "../../"
repo_names = {
"my-repo" : "my-repo",
}
image_tag_mutability = "IMMUTABLE"
allowed_account_arns = {
"my-account" : "\"arn:aws:iam::123456789:root\"",
}
}
```
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | n/a |
## Resources
| Name | Type |
|------|------|
| [aws_ecr_lifecycle_policy.lifecycle](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_lifecycle_policy) | resource |
| [aws_ecr_repository.repo](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository) | resource |
| [aws_ecr_repository_policy.policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository_policy) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [allowed\_account\_arns](#input\_allowed\_account\_arns) | Map of account IDs with permission to ECR repos | `map(string)` | n/a | yes |
| [image\_tag\_mutability](#input\_image\_tag\_mutability) | Whether image tags can be mutated or not | `string` | `"IMMUTABLE"` | no |
| [max\_days\_for\_untagged\_images](#input\_max\_days\_for\_untagged\_images) | Maximum days to keep untagged images in repository | `number` | `14` | no |
| [project\_tags](#input\_project\_tags) | Tagging of ECR repository | `map(string)` |
{
"Terraform": "True"
} | no |
| [repo\_names](#input\_repo\_names) | Name of ECR repository | `map(string)` | n/a | yes |
| [scan\_on\_push](#input\_scan\_on\_push) | Scan container images on push | `bool` | `true` | no |
## Outputs
| Name | Description |
|------|-------------|
| [ecr](#output\_ecr) | ECR repository name |
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_ecr_lifecycle_policy.lifecycle](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_lifecycle_policy) | resource |
| [aws_ecr_pull_through_cache_rule.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_pull_through_cache_rule) | resource |
| [aws_ecr_repository.repo](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository) | resource |
| [aws_ecr_repository_policy.policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository_policy) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [allowed\_account\_arns](#input\_allowed\_account\_arns) | Map of account IDs with permission to ECR repos | `map(string)` | n/a | yes |
| [image\_tag\_mutability](#input\_image\_tag\_mutability) | Whether image tags can be mutated or not | `string` | `"IMMUTABLE"` | no |
| [max\_days\_for\_untagged\_images](#input\_max\_days\_for\_untagged\_images) | Maximum days to keep untagged images in repository | `number` | `14` | no |
| [project\_tags](#input\_project\_tags) | Tagging of ECR repository | `map(string)` |
{
"Terraform": "True"
} | no |
| [pull\_through\_cache\_rules](#input\_pull\_through\_cache\_rules) | Use a prefix to pull through from a 3rd party upstream registry. | `map(map(string))` | n/a | yes |
| [repo\_names](#input\_repo\_names) | Name of ECR repository | `map(string)` | n/a | yes |
| [scan\_on\_push](#input\_scan\_on\_push) | Scan container images on push | `bool` | `true` | no |
| [tags](#input\_tags) | n/a | `map(string)` | `{}` | no |
## Outputs
| Name | Description |
|------|-------------|
| [ecr](#output\_ecr) | ECR repository name |