AwsEcrRepositoryArgs

interface AwsEcrRepositoryArgs extends Omit<AwsEcrRepositoryResourceArgs, 'name'> { encryption?: { kmsKey?: AwsKmsKeyInput; type: 'AES256' | 'KMS' }; forceDelete?: Input<boolean | undefined>; imageScanningConfiguration?: Input<RepositoryImageScanningConfiguration | undefined>; imageTagMutability?: Input<string | undefined>; imageTagMutabilityExclusionFilters?: Input<Input<RepositoryImageTagMutabilityExclusionFilter>[] | undefined>; lifecyclePolicy?: AwsEcrRepositoryLifecyclePolicyArgs; name: string; region?: Input<string | undefined>; repositoryPolicy?: AwsEcrRepositoryPolicyConfigurationArgs; scanOnPush?: Input<boolean>; tags?: Input<{ [key: string]: Input<string> } | undefined>; useDeploymentAccount?: boolean; }

Arguments for an opinionated ECR repository with lifecycle and repository policy orchestration.

Remarks

useDeploymentAccount defaults to true. Unless an explicit AWS provider is supplied in resource options, the component assumes the preconfigured repository-push role in the deployment account. The default repository policy performs AWS Organizations lookups through the preconfigured organisational-unit lookup role. Supplying repositoryPolicy.policy avoids that lookup and uses the rendered policy unchanged.

Example

CODE
import type { AwsEcrRepositoryArgs } from '@jobcloud/aws-ecr';

const repository: AwsEcrRepositoryArgs = {
  name: 'applicationRepository',
  useDeploymentAccount: false,
};

Hierarchy

  • Omit<AwsEcrRepositoryResourceArgs, "name">
  • AwsEcrRepositoryArgs

Properties

encryption: { kmsKey?: AwsKmsKeyInput; type: 'AES256' | 'KMS' }

Inherited from encryption

Optional repository encryption configuration. Defaults to ECR-managed AES-256 encryption.

Properties

  • kmsKey (AwsKmsKeyInput, optional) — Customer-managed KMS key. Required when type is KMS.
  • type ("AES256" | "KMS") — Encryption type.

forceDelete: Input<boolean | undefined>

Inherited from forceDelete

If true, will delete the repository even if it contains images. Defaults to false.

imageScanningConfiguration: Input<RepositoryImageScanningConfiguration | undefined>

Inherited from imageScanningConfiguration

Configuration block that defines image scanning configuration for the repository. By default, image scanning must be manually triggered. See the ECR User Guide for more information about image scanning.

imageTagMutability: Input<string | undefined>

Inherited from imageTagMutability

The tag mutability setting for the repository. Must be one of: MUTABLE, IMMUTABLE, IMMUTABLE_WITH_EXCLUSION, or MUTABLE_WITH_EXCLUSION. Defaults to MUTABLE.

imageTagMutabilityExclusionFilters: Input<Input<RepositoryImageTagMutabilityExclusionFilter>[] | undefined>

Inherited from imageTagMutabilityExclusionFilters

Configuration block that defines filters to specify which image tags can override the default tag mutability setting. Only applicable when imageTagMutability is set to IMMUTABLE_WITH_EXCLUSION or MUTABLE_WITH_EXCLUSION. See below for schema.

lifecyclePolicy: AwsEcrRepositoryLifecyclePolicyArgs

Lifecycle policy configuration (always created).

name: string

Plain-string camel-case repository identity used for logical and provider naming.

region: Input<string | undefined>

Inherited from region

Region where this resource will be managed. Defaults to the Region set in the provider configuration.

repositoryPolicy: AwsEcrRepositoryPolicyConfigurationArgs

Repository policy configuration (always created).

scanOnPush: Input<boolean>

Inherited from scanOnPush

Enables scan-on-push when imageScanningConfiguration is not explicitly set.

tags: Input<{ [key: string]: Input<string> } | undefined>

Inherited from tags

A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

useDeploymentAccount: boolean

Whether to create ECR resources in the deployment account by default.

Default: ```ts true ```