Skip to content

Resource: awsEcrpublicRepository

Provides a Public Elastic Container Registry Repository.

\~> NOTE: This resource can only be used in the usEast1 region.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsUsEast1 = new aws.provider.AwsProvider(this, "aws", {
  alias: "us_east_1",
  region: "us-east-1",
});
new aws.ecrpublicRepository.EcrpublicRepository(this, "foo", {
  catalogData: {
    aboutText: "About Text",
    architectures: ["ARM"],
    description: "Description",
    logoImageBlob: "${filebase64(image.png)}",
    operatingSystems: ["Linux"],
    usageText: "Usage Text",
  },
  provider: `\${${awsUsEast1.fqn}}`,
  repositoryName: "bar",
  tags: {
    env: "production",
  },
});

Argument Reference

The following arguments are supported:

  • repositoryName - (Required) Name of the repository.
  • catalogData - (Optional) Catalog data configuration for the repository. See below for schema.
  • tags - (Optional) Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

catalogData

  • aboutText - (Optional) A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.
  • architectures - (Optional) The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters: arm, arm64, x86, x8664
  • description - (Optional) A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.
  • logoImageBlob - (Optional) The base64-encoded repository logo payload. (Only visible for verified accounts) Note that drift detection is disabled for this attribute.
  • operatingSystems - (Optional) The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters: linux, windows
  • usageText - (Optional) Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - Full ARN of the repository.
  • id - The repository name.
  • registryId - The registry ID where the repository was created.
  • repositoryUri - The URI of the repository.
  • tagsAll - Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Timeouts

Configuration options:

  • delete - (Default 20M)

Import

ECR Public Repositories can be imported using the repositoryName, e.g.,

$ terraform import aws_ecrpublic_repository.example example