awsx.ecr.Repository
Explore with Pulumi AI
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Repository(name: string, args?: RepositoryArgs, opts?: CustomResourceOptions);
@overload
def Repository(resource_name: str,
args: Optional[RepositoryArgs] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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:
- Encryption
Configurations List<Pulumi.Aws. Ecr. Inputs. Repository Encryption Configuration> - Encryption configuration for the repository. See below for schema.
- Force
Delete bool - If
true
, will delete the repository even if it contains images. Defaults tofalse
. - Image
Scanning Pulumi.Configuration Aws. Ecr. Inputs. Repository Image Scanning Configuration 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.
This type is defined in the AWS Classic package.
- Image
Tag stringMutability - The tag mutability setting for the repository. Must be one of:
MUTABLE
orIMMUTABLE
. Defaults toMUTABLE
. - Lifecycle
Policy LifecyclePolicy Args - 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.
- 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.
- Encryption
Configurations RepositoryEncryption Configuration Args - Encryption configuration for the repository. See below for schema.
- Force
Delete bool - If
true
, will delete the repository even if it contains images. Defaults tofalse
. - Image
Scanning RepositoryConfiguration Image Scanning Configuration Args 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.
This type is defined in the AWS Classic package.
- Image
Tag stringMutability - The tag mutability setting for the repository. Must be one of:
MUTABLE
orIMMUTABLE
. Defaults toMUTABLE
. - Lifecycle
Policy LifecyclePolicy Args - 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.
- 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.
- encryption
Configurations List<RepositoryEncryption Configuration> - Encryption configuration for the repository. See below for schema.
- force
Delete Boolean - If
true
, will delete the repository even if it contains images. Defaults tofalse
. - image
Scanning RepositoryConfiguration Image Scanning Configuration 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.
This type is defined in the AWS Classic package.
- image
Tag StringMutability - The tag mutability setting for the repository. Must be one of:
MUTABLE
orIMMUTABLE
. Defaults toMUTABLE
. - lifecycle
Policy LifecyclePolicy Args - 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.
- 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.
- encryption
Configurations pulumiAws.types.input. Repository Encryption Configuration[] - Encryption configuration for the repository. See below for schema.
- force
Delete boolean - If
true
, will delete the repository even if it contains images. Defaults tofalse
. - image
Scanning pulumiConfiguration Aws.types.input. Repository Image Scanning Configuration 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.
This type is defined in the AWS Classic package.
- image
Tag stringMutability - The tag mutability setting for the repository. Must be one of:
MUTABLE
orIMMUTABLE
. Defaults toMUTABLE
. - lifecycle
Policy LifecyclePolicy Args - 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.
- {[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 Sequence[pulumi_aws.ecr. Repository Encryption Configuration Args] - Encryption configuration for the repository. See below for schema.
- force_
delete bool - If
true
, will delete the repository even if it contains images. Defaults tofalse
. - image_
scanning_ pulumi_configuration aws.ecr. Repository Image Scanning Configuration Args 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.
This type is defined in the AWS Classic package.
- image_
tag_ strmutability - The tag mutability setting for the repository. Must be one of:
MUTABLE
orIMMUTABLE
. Defaults toMUTABLE
. - lifecycle_
policy LifecyclePolicy Args - 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.
- 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.
- encryption
Configurations List<Property Map> - Encryption configuration for the repository. See below for schema.
- force
Delete Boolean - If
true
, will delete the repository even if it contains images. Defaults tofalse
. - image
Scanning Property MapConfiguration 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.
This type is defined in the AWS Classic package.
- image
Tag StringMutability - The tag mutability setting for the repository. Must be one of:
MUTABLE
orIMMUTABLE
. Defaults toMUTABLE
. - lifecycle
Policy 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.
- 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:
- Aws
Repository Pulumi.Aws. Ecr. Repository - Underlying Repository resource This type is defined in the AWS Classic package.
- Url string
- The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
- Repository Repository
- Underlying Repository resource This type is defined in the AWS Classic package.
- Url string
- The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
- repository Repository
- Underlying Repository resource This type is defined in the AWS Classic package.
- url String
- The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
- repository
pulumi
Aws. Repository - Underlying Repository resource This type is defined in the AWS Classic package.
- url string
- The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
- repository
pulumi_
aws.ecr. Repository - Underlying Repository resource This type is defined in the AWS Classic package.
- 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 This type is defined in the AWS Classic package.
- 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<Lifecycle
Policy Rule> - 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 ofany
, then it will have the highest priority. - Skip bool
- Skips creation of the policy if set to
true
.
- Rules
[]Lifecycle
Policy Rule - 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 ofany
, then it will have the highest priority. - Skip bool
- Skips creation of the policy if set to
true
.
- rules
List<Lifecycle
Policy Rule> - 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 ofany
, then it will have the highest priority. - skip Boolean
- Skips creation of the policy if set to
true
.
- rules
Lifecycle
Policy Rule[] - 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 ofany
, then it will have the highest priority. - skip boolean
- Skips creation of the policy if set to
true
.
- rules
Sequence[Lifecycle
Policy Rule] - 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 ofany
, 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 ofany
, then it will have the highest priority. - skip Boolean
- Skips creation of the policy if set to
true
.
LifecyclePolicyRule, LifecyclePolicyRuleArgs
- Pulumi.
Awsx. Ecr. Lifecycle Tag Status - 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.
- Maximum
Age doubleLimit - The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- Maximum
Number doubleOf Images - The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- Tag
Prefix List<string>List - 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.
- Lifecycle
Tag Status - 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.
- Maximum
Age float64Limit - The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- Maximum
Number float64Of Images - The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- Tag
Prefix []stringList - 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.
- Lifecycle
Tag Status - 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.
- maximum
Age DoubleLimit - The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- maximum
Number DoubleOf Images - The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- tag
Prefix List<String>List - 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.
- Lifecycle
Tag Status - 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.
- maximum
Age numberLimit - The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- maximum
Number numberOf Images - The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- tag
Prefix string[]List - 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 LifecycleTag Status - 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_ floatlimit - The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- maximum_
number_ floatof_ images - The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- tag_
prefix_ Sequence[str]list - 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.
- "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.
- maximum
Age NumberLimit - The maximum age limit (in days) for your images. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- maximum
Number NumberOf Images - The maximum number of images that you want to retain in your repository. Either [maximumNumberOfImages] or [maximumAgeLimit] must be provided.
- tag
Prefix List<String>List - 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
- Lifecycle
Tag Status Any - anyEvaluate rule against all images
- Lifecycle
Tag Status Untagged - untaggedOnly evaluate rule against untagged images
- Lifecycle
Tag Status 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
- "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