1. Packages
  2. AWSx (Pulumi Crosswalk for AWS)
  3. API Docs
  4. ecr
  5. Repository
AWSx (Pulumi Crosswalk for AWS) v2.5.0 published on Tuesday, Jan 30, 2024 by Pulumi

awsx.ecr.Repository

Explore with Pulumi AI

awsx logo
AWSx (Pulumi Crosswalk for AWS) v2.5.0 published on Tuesday, Jan 30, 2024 by Pulumi

    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.

    Create Repository Resource

    new Repository(name: string, args?: RepositoryArgs, opts?: CustomResourceOptions);
    @overload
    def Repository(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   encryption_configurations: Optional[Sequence[pulumi_aws.ecr.RepositoryEncryptionConfigurationArgs]] = None,
                   force_delete: Optional[bool] = None,
                   image_scanning_configuration: Optional[pulumi_aws.ecr.RepositoryImageScanningConfigurationArgs] = None,
                   image_tag_mutability: Optional[str] = None,
                   lifecycle_policy: Optional[LifecyclePolicyArgs] = None,
                   name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None)
    @overload
    def Repository(resource_name: str,
                   args: Optional[RepositoryArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    func NewRepository(ctx *Context, name string, args *RepositoryArgs, opts ...ResourceOption) (*Repository, error)
    public Repository(string name, RepositoryArgs? args = null, CustomResourceOptions? opts = null)
    public Repository(String name, RepositoryArgs args)
    public Repository(String name, RepositoryArgs args, CustomResourceOptions options)
    
    type: awsx:ecr:Repository
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Repository Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Repository resource accepts the following input properties:

    EncryptionConfigurations List<Pulumi.Aws.Ecr.Inputs.RepositoryEncryptionConfiguration>
    Encryption configuration for the repository. See below for schema.
    ForceDelete bool
    If true, will delete the repository even if it contains images. Defaults to false.
    ImageScanningConfiguration Pulumi.Aws.Ecr.Inputs.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.
    ImageTagMutability string
    The tag mutability setting for the repository. Must be one of: MUTABLE or IMMUTABLE. Defaults to MUTABLE.
    LifecyclePolicy 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.
    Name string
    Name of the repository.
    Tags Dictionary<string, 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.
    EncryptionConfigurations RepositoryEncryptionConfigurationArgs
    Encryption configuration for the repository. See below for schema.
    ForceDelete bool
    If true, will delete the repository even if it contains images. Defaults to false.
    ImageScanningConfiguration RepositoryImageScanningConfigurationArgs
    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 string
    The tag mutability setting for the repository. Must be one of: MUTABLE or IMMUTABLE. Defaults to MUTABLE.
    LifecyclePolicy 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.
    Name string
    Name of the repository.
    Tags map[string]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.
    encryptionConfigurations List<RepositoryEncryptionConfiguration>
    Encryption configuration for the repository. See below for schema.
    forceDelete Boolean
    If true, will delete the repository even if it contains images. Defaults to false.
    imageScanningConfiguration 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.
    imageTagMutability String
    The tag mutability setting for the repository. Must be one of: MUTABLE or IMMUTABLE. Defaults to MUTABLE.
    lifecyclePolicy 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.
    name String
    Name of the repository.
    tags Map<String,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.
    encryptionConfigurations pulumiAws.types.input.RepositoryEncryptionConfiguration[]
    Encryption configuration for the repository. See below for schema.
    forceDelete boolean
    If true, will delete the repository even if it contains images. Defaults to false.
    imageScanningConfiguration pulumiAws.types.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.
    imageTagMutability string
    The tag mutability setting for the repository. Must be one of: MUTABLE or IMMUTABLE. Defaults to MUTABLE.
    lifecyclePolicy 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.
    name string
    Name of the repository.
    tags {[key: string]: 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.
    encryption_configurations RepositoryEncryptionConfigurationArgs]
    Encryption configuration for the repository. See below for schema.
    force_delete bool
    If true, will delete the repository even if it contains images. Defaults to false.
    image_scanning_configuration RepositoryImageScanningConfigurationArgs
    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.
    image_tag_mutability str
    The tag mutability setting for the repository. Must be one of: MUTABLE or IMMUTABLE. Defaults to MUTABLE.
    lifecycle_policy 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.
    name str
    Name of the repository.
    tags Mapping[str, str]
    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.
    encryptionConfigurations List<Property Map>
    Encryption configuration for the repository. See below for schema.
    forceDelete Boolean
    If true, will delete the repository even if it contains images. Defaults to false.
    imageScanningConfiguration Property Map
    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 String
    The tag mutability setting for the repository. Must be one of: MUTABLE or IMMUTABLE. Defaults to MUTABLE.
    lifecyclePolicy Property Map
    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.
    name String
    Name of the repository.
    tags Map<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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Repository resource produces the following output properties:

    AwsRepository Pulumi.Aws.Ecr.Repository
    Underlying Repository resource
    Url string
    The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
    Repository Repository
    Underlying Repository resource
    Url string
    The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
    repository Repository
    Underlying Repository resource
    url String
    The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
    repository pulumiAws.Repository
    Underlying Repository resource
    url string
    The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
    repository Repository
    Underlying Repository resource
    url str
    The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
    repository aws::Repository
    Underlying Repository resource
    url String
    The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).

    Supporting Types

    LifecyclePolicy, LifecyclePolicyArgs

    Rules List<LifecyclePolicyRule>
    Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a selection value of any, then it will have the highest priority.
    Skip bool
    Skips creation of the policy if set to true.
    Rules []LifecyclePolicyRule
    Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a selection value of any, then it will have the highest priority.
    Skip bool
    Skips creation of the policy if set to true.
    rules List<LifecyclePolicyRule>
    Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a selection value of any, then it will have the highest priority.
    skip Boolean
    Skips creation of the policy if set to true.
    rules LifecyclePolicyRule[]
    Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a selection value of any, then it will have the highest priority.
    skip boolean
    Skips creation of the policy if set to true.
    rules Sequence[LifecyclePolicyRule]
    Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a selection value of any, then it will have the highest priority.
    skip bool
    Skips creation of the policy if set to true.
    rules List<Property Map>
    Specifies the rules to determine how images should be retired from this repository. Rules are ordered from lowest priority to highest. If there is a rule with a selection value of any, then it will have the highest priority.
    skip Boolean
    Skips creation of the policy if set to true.

    LifecyclePolicyRule, LifecyclePolicyRuleArgs

    TagStatus Pulumi.Awsx.Ecr.LifecycleTagStatus
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
    Description string
    Describes the purpose of a rule within a lifecycle policy.
    MaximumAgeLimit double
    The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    MaximumNumberOfImages double
    The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    TagPrefixList List<string>
    A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.
    TagStatus LifecycleTagStatus
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
    Description string
    Describes the purpose of a rule within a lifecycle policy.
    MaximumAgeLimit float64
    The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    MaximumNumberOfImages float64
    The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    TagPrefixList []string
    A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.
    tagStatus LifecycleTagStatus
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
    description String
    Describes the purpose of a rule within a lifecycle policy.
    maximumAgeLimit Double
    The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    maximumNumberOfImages Double
    The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    tagPrefixList List<String>
    A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.
    tagStatus LifecycleTagStatus
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
    description string
    Describes the purpose of a rule within a lifecycle policy.
    maximumAgeLimit number
    The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    maximumNumberOfImages number
    The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    tagPrefixList string[]
    A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.
    tag_status LifecycleTagStatus
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
    description str
    Describes the purpose of a rule within a lifecycle policy.
    maximum_age_limit float
    The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    maximum_number_of_images float
    The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    tag_prefix_list Sequence[str]
    A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.
    tagStatus "any" | "untagged" | "tagged"
    Determines whether the lifecycle policy rule that you are adding specifies a tag for an image. Acceptable options are tagged, untagged, or any. If you specify any, then all images have the rule evaluated against them. If you specify tagged, then you must also specify a tagPrefixList value. If you specify untagged, then you must omit tagPrefixList.
    description String
    Describes the purpose of a rule within a lifecycle policy.
    maximumAgeLimit Number
    The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    maximumNumberOfImages Number
    The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
    tagPrefixList List<String>
    A list of image tag prefixes on which to take action with your lifecycle policy. Only used if you specified "tagStatus": "tagged". For example, if your images are tagged as prod, prod1, prod2, and so on, you would use the tag prefix prod to specify all of them. If you specify multiple tags, only the images with all specified tags are selected.

    LifecycleTagStatus, LifecycleTagStatusArgs

    Any
    anyEvaluate rule against all images
    Untagged
    untaggedOnly evaluate rule against untagged images
    Tagged
    taggedOnly evaluated rule against images with specified prefixes
    LifecycleTagStatusAny
    anyEvaluate rule against all images
    LifecycleTagStatusUntagged
    untaggedOnly evaluate rule against untagged images
    LifecycleTagStatusTagged
    taggedOnly evaluated rule against images with specified prefixes
    Any
    anyEvaluate rule against all images
    Untagged
    untaggedOnly evaluate rule against untagged images
    Tagged
    taggedOnly evaluated rule against images with specified prefixes
    Any
    anyEvaluate rule against all images
    Untagged
    untaggedOnly evaluate rule against untagged images
    Tagged
    taggedOnly evaluated rule against images with specified prefixes
    ANY
    anyEvaluate rule against all images
    UNTAGGED
    untaggedOnly evaluate rule against untagged images
    TAGGED
    taggedOnly evaluated rule against images with specified prefixes
    "any"
    anyEvaluate rule against all images
    "untagged"
    untaggedOnly evaluate rule against untagged images
    "tagged"
    taggedOnly evaluated rule against images with specified prefixes

    Package Details

    Repository
    AWSx (Pulumi Crosswalk for AWS) pulumi/pulumi-awsx
    License
    Apache-2.0
    awsx logo
    AWSx (Pulumi Crosswalk for AWS) v2.5.0 published on Tuesday, Jan 30, 2024 by Pulumi