## ECR Repository

ECR repository module version 4. This module can be used to create ECR repository accessible from ECR and Lambda services from other accounts.

## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.10 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_ecr_lifecycle_policy.remove_old_untagged_images](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_lifecycle_policy) | resource |
| [aws_ecr_repository.ecr_repo](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository) | resource |
| [aws_ecr_repository_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository_policy) | resource |
| [aws_iam_policy_document.crossaccount](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_common_tags"></a> [common\_tags](#input\_common\_tags) | A map of tags to assign to the resource. | `map(string)` | `{}` | no |
| <a name="input_enable_immutable_tags"></a> [enable\_immutable\_tags](#input\_enable\_immutable\_tags) | Enables tags immutability for the repository | `bool` | `false` | no |
| <a name="input_lambda"></a> [lambda](#input\_lambda) | Indicates whether AWS Lambda has permission to pull from the repository. | `bool` | `false` | no |
| <a name="input_lambda_region"></a> [lambda\_region](#input\_lambda\_region) | Name of AWS region. | `string` | `"us-east-1"` | no |
| <a name="input_repo_name"></a> [repo\_name](#input\_repo\_name) | Name of the repository. | `string` | n/a | yes |
| <a name="input_ro_accounts"></a> [ro\_accounts](#input\_ro\_accounts) | List of AWS account IDs which will be allowed to read images from the repository | `list(string)` | `[]` | no |
| <a name="input_rw_accounts"></a> [rw\_accounts](#input\_rw\_accounts) | List of AWS account IDs which will be allowed to perform write operations to the repository | `list(string)` | `[]` | no |
| <a name="input_scan_on_push"></a> [scan\_on\_push](#input\_scan\_on\_push) | Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false) | `bool` | `false` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_ecr"></a> [ecr](#output\_ecr) | ECR repository |
| <a name="output_lifecycle_policy"></a> [lifecycle\_policy](#output\_lifecycle\_policy) | Lifecycle policy |
| <a name="output_resource_policy"></a> [resource\_policy](#output\_resource\_policy) | ECR repo resource policy. List which could contain one or zero elements |
