Terraform resource: aws ecr pull through cache rule

From wikieduonline
Jump to navigation Jump to search

Official example[edit]

resource "aws_ecr_pull_through_cache_rule" "example" {
 ecr_repository_prefix = "ecr-public"
 upstream_registry_url = "public.ecr.aws"
 credential_arn        = "arn:aws:secretsmanager:us-east-1:123456789:secret:ecr-pullthroughcache/ecrpublic"
}


Other example with secret managed by TF

resource "aws_ecr_pull_through_cache_rule" "docker_hub" {
  ecr_repository_prefix = "docker-hub"
  upstream_registry_url = "registry-1.docker.io"
  credential_arn        = aws_secretsmanager_secret.docker_hub.arn
}

Related[edit]

See also[edit]

Advertising: