Resource: aws_ecrpublic_repository

Provides a Public Elastic Container Registry Repository.

Example Usage

provider "aws" {
  alias  = "us_east_1"
  region = "us-east-1"
}

resource "aws_ecrpublic_repository" "foo" {
  provider = aws.us_east_1

  repository_name = "bar"

  catalog_data {
    about_text        = "About Text"
    architectures     = ["ARM"]
    description       = "Description"
    logo_image_blob   = filebase64(image.png)
    operating_systems = ["Linux"]
    usage_text        = "Usage Text"
  }

  tags = {
    env = "production"
  }
}

Argument Reference

This resource supports the following arguments:

catalog_data

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import ECR Public Repositories using the repository_name. For example:

import {
  to = aws_ecrpublic_repository.example
  id = "example"
}

Using terraform import, import ECR Public Repositories using the repository_name. For example:

% terraform import aws_ecrpublic_repository.example example