Skip to content

Data Source: awsEcrAuthorizationToken

The ECR Authorization Token data source allows the authorization token, proxy endpoint, token expiration date, user name and password to be retrieved for an ECR repository.

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.dataAwsEcrAuthorizationToken.DataAwsEcrAuthorizationToken(
  this,
  "token",
  {}
);

Argument Reference

The following arguments are supported:

  • registryId - (Optional) AWS account ID of the ECR Repository. If not specified the default account is assumed.

Attributes Reference

In addition to the argument above, the following attributes are exported:

  • authorizationToken - Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of userName:password.
  • expiresAt - Time in UTC RFC3339 format when the authorization token expires.
  • id - Region of the authorization token.
  • password - Password decoded from the authorization token.
  • proxyEndpoint - Registry URL to use in the docker login command.
  • userName - User name decoded from the authorization token.