Skip to content

Latest commit

 

History

History

ecr-registry

ecr-registry

This module creates following resources.

  • aws_ecr_registry_policy (optional)
  • aws_ecr_replication_configuration (optional)
  • aws_ecr_pull_through_cache_rule (optional)
  • aws_ecr_registry_scanning_configuration

Requirements

Name Version
terraform >= 1.5
aws >= 4.10

Providers

Name Version
aws 5.19.0

Modules

No modules.

Resources

Name Type
aws_ecr_pull_through_cache_rule.this resource
aws_ecr_registry_policy.this resource
aws_ecr_registry_scanning_configuration.this resource
aws_ecr_replication_configuration.this resource
aws_caller_identity.this data source
aws_iam_policy_document.pull_through_cache data source
aws_iam_policy_document.replication data source
aws_iam_policy_document.this data source
aws_region.this data source

Inputs

Name Description Type Default Required
policy (Optional) The policy document for ECR registry. This is a JSON formatted string. string null no
pull_through_cache_policies (Optional) A list of ECR Registry Policies for Pull Through Cache. Each value of pull_through_cache_policies as defined below.
(Required) iam_entities - Specify one or more IAM principals to grant permission. Support the ARN of IAM entities, or AWS account ID.
(Required) allow_create_repository - Need to create target repositories if allow_create_repository is false.
(Required) repositories - A list of target repositories. Support glob expressions for repositories like *.
list(object({
iam_entities = list(string)
allow_create_repository = bool
repositories = list(string)
}))
[] no
pull_through_cache_rules (Optional) A list of Pull Through Cache Rules for ECR registry. A pull_through_cache_rules block as defined below.
(Required) upstream_url - The registry URL of the upstream public registry to use as the source.
(Optional) namespace - The repository name prefix to use when caching images from the source registry. Default value is used if not provided.
list(any) [] no
replication_destinations (Optional) A list of destinations for ECR registry replication. registry_id is the account ID of the destination registry to replicate to. region is required to replicate to.
list(object({
registry_id = string
region = string
}))
[] no
replication_policies (Optional) A list of ECR Registry Policies for replication. account_id is source AWS account for replication. If allow_create_repository is false, you need to create repositories with the same name whithin your registry. repositories is a list of target repositories. Support glob expressions for repositories like *.
list(object({
account_id = string
allow_create_repository = bool
repositories = list(string)
}))
[] no
scanning_continuous_filters (Optional) A list of repository filter to scan continuous. Wildcard character is allowed. list(string) [] no
scanning_on_push_filters (Optional) A list of repository filter to scan on push. Wildcard character is allowed. list(string) [] no
scanning_type (Optional) The scanning type to set for the registry. Can be either ENHANCED or BASIC. string "BASIC" no

Outputs

Name Description
id The ID of the registry.
name The name of the registry.
policy The registry policy.
pull_through_cache_rules A list of Pull Through Cache Rules for ECR registry.
replication_destinations A list of destinations for ECR registry replication.
scanning_continuous_filters A list of repository filter to scan continuous.
scanning_on_push_filters A list of repository filter to scan on push.
scanning_type The scanning type for the registry.