AWSx

v1.0.0-beta.7 published on Wednesday, May 25, 2022 by Pulumi

Repository

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 a 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,
               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.RepositoryEncryptionConfigurationArgs>

Encryption configuration for the repository. See below for schema.

ImageScanningConfiguration Pulumi.Aws.Ecr.Inputs.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 Pulumi.Awsx.Ecr.Inputs.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.

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<RepositoryEncryptionConfigurationArgs>

Encryption configuration for the repository. See below for schema.

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 pulumiAws.types.input.RepositoryEncryptionConfiguration[]

Encryption configuration for the repository. See below for schema.

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.

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.

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

Id string

The provider-assigned unique ID for this managed resource.

Url string

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

Id string

The provider-assigned unique ID for this managed resource.

Repository Repository

Underlying Repository resource

Url string

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

id String

The provider-assigned unique ID for this managed resource.

repository Repository

Underlying Repository resource

url String

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

id string

The provider-assigned unique ID for this managed resource.

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).

id str

The provider-assigned unique ID for this managed resource.

repository Repository

Underlying Repository resource

url str

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

id String

The provider-assigned unique ID for this managed resource.

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

Rules List<Pulumi.Awsx.Ecr.Inputs.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

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

Any
any

Evaluate rule against all images

Untagged
untagged

Only evaluate rule against untagged images

Tagged
tagged

Only evaluated rule against images with specified prefixes

LifecycleTagStatusAny
any

Evaluate rule against all images

LifecycleTagStatusUntagged
untagged

Only evaluate rule against untagged images

LifecycleTagStatusTagged
tagged

Only evaluated rule against images with specified prefixes

Any
any

Evaluate rule against all images

Untagged
untagged

Only evaluate rule against untagged images

Tagged
tagged

Only evaluated rule against images with specified prefixes

Any
any

Evaluate rule against all images

Untagged
untagged

Only evaluate rule against untagged images

Tagged
tagged

Only evaluated rule against images with specified prefixes

ANY
any

Evaluate rule against all images

UNTAGGED
untagged

Only evaluate rule against untagged images

TAGGED
tagged

Only evaluated rule against images with specified prefixes

"any"
any

Evaluate rule against all images

"untagged"
untagged

Only evaluate rule against untagged images

"tagged"
tagged

Only evaluated rule against images with specified prefixes

Package Details

Repository
https://github.com/pulumi/pulumi-awsx
License
Apache-2.0