1. Docs
  2. @pulumi/awsx
  3. ecr

Module ecr

    Resources

    Others

    Resources

    Resource Image

    class Image extends ComponentResource

    Builds a docker image and pushes to the ECR repository

    constructor

    new Image(name: string, args: ImageArgs, opts?: pulumi.ComponentResourceOptions)

    Create a Image resource with the given unique name, arguments, and options.

    • name The unique name of the resource.
    • args The arguments to use to populate this resource's properties.
    • opts A bag of options that control this resource's behavior.

    method getData

    protected getData(): Promise<TData>

    Retrieves the data produces by [initialize]. The data is immediately available in a derived class’s constructor after the super(...) call to ComponentResource.

    method getProvider

    getProvider(moduleMember: string): ProviderResource | undefined

    method initialize

    protected initialize(args: Inputs): Promise<TData>

    Can be overridden by a subclass to asynchronously initialize data for this Component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use .getData.

    method isInstance

    public static isInstance(obj: any): obj is Image

    Returns true if the given object is an instance of Image. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

    method registerOutputs

    protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void

    registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

    ComponentResources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

    property imageUri

    public imageUri: pulumi.Output<string>;

    Unique identifier of the pushed image

    property urn

    urn: Output<URN>;

    urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

    Resource Repository

    class Repository extends ComponentResource

    A [Repository] represents an [aws.ecr.Repository] along with an associated [LifecyclePolicy] controlling how images are retained in the repo.

    Docker images can be built and pushed to the repo using the [buildAndPushImage] method. This will call into the @pulumi/docker/buildAndPushImage function using this repo as the appropriate destination registry.

    constructor

    new Repository(name: string, args?: RepositoryArgs, opts?: pulumi.ComponentResourceOptions)

    Create a Repository resource with the given unique name, arguments, and options.

    • name The unique name of the resource.
    • args The arguments to use to populate this resource's properties.
    • opts A bag of options that control this resource's behavior.

    method getData

    protected getData(): Promise<TData>

    Retrieves the data produces by [initialize]. The data is immediately available in a derived class’s constructor after the super(...) call to ComponentResource.

    method getProvider

    getProvider(moduleMember: string): ProviderResource | undefined

    method initialize

    protected initialize(args: Inputs): Promise<TData>

    Can be overridden by a subclass to asynchronously initialize data for this Component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use .getData.

    method isInstance

    public static isInstance(obj: any): obj is Repository

    Returns true if the given object is an instance of Repository. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

    method registerOutputs

    protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void

    registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

    ComponentResources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

    property lifecyclePolicy

    public lifecyclePolicy: pulumi.Output<LifecyclePolicy | undefined>;

    Underlying repository lifecycle policy

    property repository

    public repository: pulumi.Output<Repository>;

    Underlying Repository resource

    property url

    public url: pulumi.Output<string>;

    The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).

    property urn

    urn: Output<URN>;

    urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

    Others

    interface ImageArgs

    interface ImageArgs

    The set of arguments for constructing a Image resource.

    property args

    args?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

    An optional map of named build-time argument variables to set during the Docker build. This flag allows you to pass built-time variables that can be accessed like environment variables inside the RUN instruction.

    property cacheFrom

    cacheFrom?: pulumi.Input<pulumi.Input<string>[]>;

    Images to consider as cache sources

    property dockerfile

    dockerfile?: pulumi.Input<string>;

    dockerfile may be used to override the default Dockerfile name and/or location. By default, it is assumed to be a file named Dockerfile in the root of the build context.

    property env

    env?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

    Environment variables to set on the invocation of docker build, for example to support DOCKER_BUILDKIT=1 docker build.

    property extraOptions

    extraOptions?: pulumi.Input<pulumi.Input<string>[]>;

    An optional catch-all list of arguments to provide extra CLI options to the docker build command. For example ['--network', 'host'].

    property path

    path?: pulumi.Input<string>;

    Path to a directory to use for the Docker build context, usually the directory in which the Dockerfile resides (although dockerfile may be used to choose a custom location independent of this choice). If not specified, the context defaults to the current working directory; if a relative path is used, it is relative to the current working directory that Pulumi is evaluating.

    property repositoryUrl

    repositoryUrl: pulumi.Input<string>;

    Url of the repository

    property target

    target?: pulumi.Input<string>;

    The target of the dockerfile to build

    interface RepositoryArgs

    interface RepositoryArgs

    The set of arguments for constructing a Repository resource.

    property encryptionConfigurations

    encryptionConfigurations?: pulumi.Input<pulumi.Input<RepositoryEncryptionConfiguration>[]>;

    Encryption configuration for the repository. See below for schema.

    property imageScanningConfiguration

    imageScanningConfiguration?: pulumi.Input<RepositoryImageScanningConfiguration>;

    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.

    property imageTagMutability

    imageTagMutability?: pulumi.Input<string>;

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

    property lifecyclePolicy

    lifecyclePolicy?: inputs.ecr.LifecyclePolicyArgs;

    A lifecycle policy consists of one or more rules that determine which images in a repository should be expired. If not provided, this will default to untagged images expiring after 1 day.

    property name

    name?: pulumi.Input<string>;

    Name of the repository.

    property tags

    tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

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

      Pulumi AI - What cloud infrastructure would you like to build? Generate Program