@zarpay/zar-cdk-lib - v0.32.0
    Preparing search index...

    Class EcrRepository

    Creates an ECR Repository with ZAR's standard lifecycle rules and cross-account pull permissions.

    Features:

    • Immutable image tags for reproducibility (with 'latest' excluded by default)
    • Image scanning on push enabled by default
    • Default lifecycle rules (can be overridden):
      • Keeps last 10 release images (tags starting with 'v')
      • Removes all other images after 30 days
    • Cross-account pull permissions for trusted accounts
    const repo = new EcrRepository(this, 'MyAppRepo', {
    repositoryName: 'my-app',
    trustedAwsAccounts: ['123456789012', '987654321098'],
    });

    Hierarchy

    • Construct
      • EcrRepository
    Index

    Constructors

    Properties

    Constructors

    Properties

    account: string

    The AWS account ID where this repository is deployed.

    repository: Repository

    The underlying ECR repository.