The ECR Repository data source allows the ARN, Repository URI and Registry ID to be retrieved for an ECR repository.
data "aws_ecr_repository" "service" { name = "ecr-repository" }
The following arguments are supported:
name
- (Required) The name of the ECR Repository. In addition to all arguments above, the following attributes are exported:
arn
- Full ARN of the repository. registry_id
- The registry ID where the repository was created. repository_url
- The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName
).
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/aws/d/ecr_repository.html