Skip to content

Data Source: awsEcrImage

The ECR Image data source allows the details of an image with a particular tag or digest to be retrieved.

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";
new aws.dataAwsEcrImage.DataAwsEcrImage(this, "service_image", {
  imageTag: "latest",
  repositoryName: "my/service",
});

Argument Reference

The following arguments are supported:

  • registryId - (Optional) ID of the Registry where the repository resides.
  • repositoryName - (Required) Name of the ECR Repository.
  • imageDigest - (Optional) Sha256 digest of the image manifest. At least one of imageDigest, imageTag, or mostRecent must be specified.
  • imageTag - (Optional) Tag associated with this image. At least one of imageDigest, imageTag, or mostRecent must be specified.
  • mostRecent - (Optional) Return the most recently pushed image. At least one of imageDigest, imageTag, or mostRecent must be specified.

Attributes Reference

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

  • id - SHA256 digest of the image manifest.
  • imagePushedAt - Date and time, expressed as a unix timestamp, at which the current image was pushed to the repository.
  • imageSizeInBytes - Size, in bytes, of the image in the repository.
  • imageTags - List of tags associated with this image.