ecr-cross-account
doingcloudright/ecr-cross-account/aws
Terraform module to create an ECR repo with cross-account-access
Install
README
AWS ECR Module  This module simplifies the creation of an ECR Bucket which serves different AWS Accounts and different stages of development. The lifecycle policy rules can be passed as list of strings inside lifecycle_policy_rules. For generation of lifecycle policy rules please check out doingcloudright/ecr-lifecycle-policy-rule/aws . The list allowed_read_principals is mandatory and defines which principals have read access to the repository. allowed_write_principals could define a principle which has write (&read) access to the repository e.g. the CICD user. _NOTE_ ECR Resource Level policies give certain arns specific access to the Repository configured. However, a minimal IAM policy for the specific
Inputs (11)
| Name | Type | Description | Default |
|---|---|---|---|
| namespace | string | The namespace we interpolate in all resources | required |
| name | string | name defines the name of the repository, by default it will be interpolated to { | required |
| allowed_read_principals | list | allowed_read_principals defines which external principals are allowed to read fr | required |
| lifecycle_policy_rules | list | List of json lifecycle policy rules, created by another module: doingcloudright/ | [] |
| image_tag_mutability | string | The tag mutability setting for the repository. Must be one of: MUTABLE or IMMUTA | "MUTABLE" |
| tags | map | A map of tags to assign to the resource. | {} |
| use_namespaces | bool | use_namespaces defines if we want to interpolate the namespace inside the repo n | true |
| lifecycle_policy_rules_count | string | The amount of lifecycle_policy_rules, this to make sure we are not running into | "0" |
| allowed_write_principals | list | allowed_write_principals defines which external principals are allowed to write | [] |
| scan_on_pushing | bool | Indicates whether images are scanned after being pushed to the repository (true) | false |
| create | bool | create defines if resources need to be created true/false | true |
Outputs (4)
repository_arn — Repository ARNrepository_name — Repository nameregistry_id — Registry IDregistry_url — Registry URL