Module Reference

ECR — Container Registry Access

GitHub Actions OIDC roles for pulling and pushing container images to AWS ECR.

NewProduction

Directory: global/ecr/

Files: iam.tf, outputs.tf, variables.tf

What It Manages

This module provides OIDC access roles for GitHub Actions to pull and push Docker images to AWS ECR. It does not create ECR repositories — those are managed per-project (see ADR-001).

Hybrid Management Model

ConcernManaged ByLocation
OIDC roles (pull/push)This moduleglobal/ecr/iam.tf
ECR repositoriesPer-projectProject's .infra/
Lifecycle policiesPer-projectProject's .infra/
Image scanningPer-projectProject's .infra/

OIDC Roles

RoleNamePermissionsRestricted To
PullGitHubActions-ECR-PullRoleRead imagesAny branch, all ontopix/* repos
PushGitHubActions-ECR-PushRoleRead + write imagesDeploy branches (master/pre/dev) + tags (refs/tags/*), all ontopix/* repos

IAM Policies

PolicyPermissions
ECRPullAccessGetAuthorizationToken, BatchGetImage, GetDownloadUrlForLayer, BatchCheckLayerAvailability, DescribeRepositories, DescribeImages, ListImages
ECRPushAccessAll pull permissions + PutImage, InitiateLayerUpload, UploadLayerPart, CompleteLayerUpload

Outputs

OutputValue
github_pull_role_arnARN for the pull role
github_push_role_arnARN for the push role
registry_url{ACCOUNT_ID}.dkr.ecr.eu-central-1.amazonaws.com

How to Set Up ECR for Your Project

See the Setup ECR Access guide.