AWS Amazon ECR Registry Policy

This page shows how to write Terraform and CloudFormation for Amazon ECR Registry Policy and write them securely.

aws_ecr_registry_policy (Terraform)

The Registry Policy in Amazon ECR can be configured in Terraform with the resource name aws_ecr_registry_policy. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "aws_ecr_registry_policy" "this" {
  policy = var.policy

Parameters

Explanation in Terraform Registry

Provides an Elastic Container Registry Policy.

AWS::ECR::RegistryPolicy (CloudFormation)

The RegistryPolicy in ECR can be configured in CloudFormation with the resource name AWS::ECR::RegistryPolicy. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

template.json#L2715
    "AWS::ECR::RegistryPolicy": {
      "Type": "AWS::ECR::RegistryPolicy",
      "Properties": {}
    },
    "AWS::ApiGateway::Method": {
      "Type": "AWS::ApiGateway::Method",

Parameters

Explanation in CloudFormation Registry

The AWS::ECR::RegistryPolicy resource creates or updates the permissions policy for a private registry.

A private registry policy is used to specify permissions for another AWS account and is used when configuring cross-account replication. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.

Frequently asked questions

What is AWS Amazon ECR Registry Policy?

AWS Amazon ECR Registry Policy is a resource for Amazon ECR of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon ECR Registry Policy?

For Terraform, the asaphe/terraform-aws-ecr source code example is useful. See the Terraform Example section for further details.

For CloudFormation, the mhlabs/aws-icons-directory source code example is useful. See the CloudFormation Example section for further details.