Repository
Provides an Elastic Container Registry Repository.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var foo = new Aws.Ecr.Repository("foo", new Aws.Ecr.RepositoryArgs
{
ImageScanningConfiguration = new Aws.Ecr.Inputs.RepositoryImageScanningConfigurationArgs
{
ScanOnPush = true,
},
ImageTagMutability = "MUTABLE",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecr.NewRepository(ctx, "foo", &ecr.RepositoryArgs{
ImageScanningConfiguration: &ecr.RepositoryImageScanningConfigurationArgs{
ScanOnPush: pulumi.Bool(true),
},
ImageTagMutability: pulumi.String("MUTABLE"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
foo = aws.ecr.Repository("foo",
image_scanning_configuration={
"scanOnPush": True,
},
image_tag_mutability="MUTABLE")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foo = new aws.ecr.Repository("foo", {
imageScanningConfiguration: {
scanOnPush: true,
},
imageTagMutability: "MUTABLE",
});Create a Repository Resource
new Repository(name: string, args?: RepositoryArgs, opts?: CustomResourceOptions);def Repository(resource_name, opts=None, image_scanning_configuration=None, image_tag_mutability=None, name=None, tags=None, __props__=None);func NewRepository(ctx *Context, name string, args *RepositoryArgs, opts ...ResourceOption) (*Repository, error)public Repository(string name, RepositoryArgs? args = null, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Repository Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Repository resource accepts the following input properties:
- 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.
- Image
Tag stringMutability The tag mutability setting for the repository. Must be one of:
MUTABLEorIMMUTABLE. Defaults toMUTABLE.- Name string
Name of the repository.
- Dictionary<string, string>
A map of tags to assign to the resource.
- 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.
- Image
Tag stringMutability The tag mutability setting for the repository. Must be one of:
MUTABLEorIMMUTABLE. Defaults toMUTABLE.- Name string
Name of the repository.
- map[string]string
A map of tags to assign to the resource.
- 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.
- image
Tag stringMutability The tag mutability setting for the repository. Must be one of:
MUTABLEorIMMUTABLE. Defaults toMUTABLE.- name string
Name of the repository.
- {[key: string]: string}
A map of tags to assign to the resource.
- image_
scanning_ Dict[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.
- image_
tag_ strmutability The tag mutability setting for the repository. Must be one of:
MUTABLEorIMMUTABLE. Defaults toMUTABLE.- name str
Name of the repository.
- Dict[str, str]
A map of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Repository resource produces the following output properties:
- Arn string
Full ARN of the repository.
- Id string
- The provider-assigned unique ID for this managed resource.
- Registry
Id string The registry ID where the repository was created.
- Repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
- Arn string
Full ARN of the repository.
- Id string
- The provider-assigned unique ID for this managed resource.
- Registry
Id string The registry ID where the repository was created.
- Repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
- arn string
Full ARN of the repository.
- id string
- The provider-assigned unique ID for this managed resource.
- registry
Id string The registry ID where the repository was created.
- repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
- arn str
Full ARN of the repository.
- id str
- The provider-assigned unique ID for this managed resource.
- registry_
id str The registry ID where the repository was created.
- repository_
url str The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
Look up an Existing Repository Resource
Get an existing Repository resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RepositoryState, opts?: CustomResourceOptions): Repositorystatic get(resource_name, id, opts=None, arn=None, image_scanning_configuration=None, image_tag_mutability=None, name=None, registry_id=None, repository_url=None, tags=None, __props__=None);func GetRepository(ctx *Context, name string, id IDInput, state *RepositoryState, opts ...ResourceOption) (*Repository, error)public static Repository Get(string name, Input<string> id, RepositoryState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Arn string
Full ARN of the repository.
- 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.
- Image
Tag stringMutability The tag mutability setting for the repository. Must be one of:
MUTABLEorIMMUTABLE. Defaults toMUTABLE.- Name string
Name of the repository.
- Registry
Id string The registry ID where the repository was created.
- Repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).- Dictionary<string, string>
A map of tags to assign to the resource.
- Arn string
Full ARN of the repository.
- 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.
- Image
Tag stringMutability The tag mutability setting for the repository. Must be one of:
MUTABLEorIMMUTABLE. Defaults toMUTABLE.- Name string
Name of the repository.
- Registry
Id string The registry ID where the repository was created.
- Repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).- map[string]string
A map of tags to assign to the resource.
- arn string
Full ARN of the repository.
- 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.
- image
Tag stringMutability The tag mutability setting for the repository. Must be one of:
MUTABLEorIMMUTABLE. Defaults toMUTABLE.- name string
Name of the repository.
- registry
Id string The registry ID where the repository was created.
- repository
Url string The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).- {[key: string]: string}
A map of tags to assign to the resource.
- arn str
Full ARN of the repository.
- image_
scanning_ Dict[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.
- image_
tag_ strmutability The tag mutability setting for the repository. Must be one of:
MUTABLEorIMMUTABLE. Defaults toMUTABLE.- name str
Name of the repository.
- registry_
id str The registry ID where the repository was created.
- repository_
url str The URL of the repository (in the form
aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).- Dict[str, str]
A map of tags to assign to the resource.
Supporting Types
RepositoryImageScanningConfiguration
- Scan
On boolPush Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false).
- Scan
On boolPush Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false).
- scan
On booleanPush Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false).
- scan
On boolPush Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false).
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.