awscc_ecr_public_repository (Resource)

The AWS::ECR::PublicRepository resource specifies an Amazon Elastic Container Public Registry (Amazon Public ECR) repository, where users can push and pull Docker images. For more information, see https://docs.aws.amazon.com/AmazonECR

Example Usage

Basic usage

To create a ECR public repository.

resource "awscc_ecr_public_repository" "example" {
  repository_name = "example"
  tags = [{
    key   = "Managed By"
    value = "AWSCC"
  }]
}

ECR public repository with Catalog Data.

To create a ECR public repository with Catalog Data.

resource "awscc_ecr_public_repository" "example_catalog_data" {
  repository_name = "example-catalog-data"
  repository_catalog_data = {
    about_text             = "about text"
    architectures          = ["ARM"]
    operating_systems      = ["Linux"]
    repository_description = "Repository description"
    usage_text             = "Usage text"
  }
  tags = [{
    key   = "Managed By"
    value = "AWSCC"
  }]
}

Schema

Optional

Read-Only

Nested Schema for repository_catalog_data

Optional:

Nested Schema for tags

Required:

Import

Import is supported using the following syntax:

$ terraform import awscc_ecr_public_repository.example <resource ID>