Terraform module for managing an AWS ECR Registry and its Repositories.
- Terragrunt: view Terragrunt usage exmaple
- Terraform: view vanilla Terraform usage exmaple
| Name | Version |
|---|---|
| terraform | 1.3.2 |
| aws | ~> 4.34.0 |
| Name | Version |
|---|---|
| aws | ~> 4.34.0 |
No modules.
| Name | Type |
|---|---|
| aws_ecr_registry_policy.list | resource |
| aws_ecr_registry_scanning_configuration.this | resource |
| aws_ecr_repository.map | resource |
| aws_ecr_repository_policy.map | resource |
| aws_iam_policy_document.Repo_Policies_Map | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| registry_policy_json | (Optional) A JSON-encoded ECR Registry Policy. Registry policies set permissions at the registry level for "ecr:ReplicateImage", "ecr:BatchImportUpstreamImage", and "ecr:CreateRepository". |
string |
null |
no |
| registry_scanning_config | (Optional) Config object for Enhanced image scanning. By default, all repos will be configured with Basic scanning. If "scan_type" is set to "ENHANCED", you can provide a map of "repo_scan_rules", in which regex strings can be supplied as keys to target one or more repos with a scan-frequency setting, which can be one of "MANUAL", "SCAN_ON_PUSH", or "CONTINUOUS_SCAN". |
object({ |
{ |
no |
| repositories | Map of ECR Repository names to config objects. For more fine-grained control over a repo's SSE, an AWS KMS key can be provided - otherwise the ECR default AES256 encryption will be used instead. "should_image_tags_be_immutabile" defaults to false if not provided. Use any of the provided "policy_config" properties to set commonly-used sets of permissions; for example, principals you provide in "allow_push_and_pull_images" will be granted all the necessary Allow-permissions necessary to push and pull images to and from the repo. Alternatively/additionally, any valid IAM policy state can be provided as a JSON array in "custom_statements_json", and the provided statements will be merged into any others you've configured. |
map( |
n/a | yes |
| Name | Description |
|---|---|
| Registry_Policy | The ECR Registry Policy resource object. |
| Registry_Scanning_Config | The ECR Registry Scanning Config resource object. |
| Repositories | Map of ECR Repository resource objects. |
| Repository_Policies | Map of ECR Repo Policy resource objects. |
All scripts and source code contained herein are for commercial use only by Nerdware, LLC.
See LICENSE for more information.