We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 14, 2026 by Pulumi
We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 14, 2026 by Pulumi
Resource Type definition for AWS::CodeCommit::Repository
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var myRepository = new AwsNative.CodeCommit.Repository("myRepository", new()
{
RepositoryName = "MyRepositoryName",
});
var myRepositoryAssociation = new AwsNative.CodeGuruReviewer.RepositoryAssociation("myRepositoryAssociation", new()
{
Name = "MyRepositoryName",
Type = AwsNative.CodeGuruReviewer.RepositoryAssociationType.CodeCommit,
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codecommit"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codegurureviewer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := codecommit.NewRepository(ctx, "myRepository", &codecommit.RepositoryArgs{
RepositoryName: pulumi.String("MyRepositoryName"),
})
if err != nil {
return err
}
_, err = codegurureviewer.NewRepositoryAssociation(ctx, "myRepositoryAssociation", &codegurureviewer.RepositoryAssociationArgs{
Name: pulumi.String("MyRepositoryName"),
Type: codegurureviewer.RepositoryAssociationTypeCodeCommit,
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const myRepository = new aws_native.codecommit.Repository("myRepository", {repositoryName: "MyRepositoryName"});
const myRepositoryAssociation = new aws_native.codegurureviewer.RepositoryAssociation("myRepositoryAssociation", {
name: "MyRepositoryName",
type: aws_native.codegurureviewer.RepositoryAssociationType.CodeCommit,
});
import pulumi
import pulumi_aws_native as aws_native
my_repository = aws_native.codecommit.Repository("myRepository", repository_name="MyRepositoryName")
my_repository_association = aws_native.codegurureviewer.RepositoryAssociation("myRepositoryAssociation",
name="MyRepositoryName",
type=aws_native.codegurureviewer.RepositoryAssociationType.CODE_COMMIT)
Example coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var myRepository = new AwsNative.CodeCommit.Repository("myRepository", new()
{
RepositoryName = "MyRepositoryName",
});
var myRepositoryAssociation = new AwsNative.CodeGuruReviewer.RepositoryAssociation("myRepositoryAssociation", new()
{
Name = "MyRepositoryName",
Type = AwsNative.CodeGuruReviewer.RepositoryAssociationType.CodeCommit,
});
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codecommit"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codegurureviewer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := codecommit.NewRepository(ctx, "myRepository", &codecommit.RepositoryArgs{
RepositoryName: pulumi.String("MyRepositoryName"),
})
if err != nil {
return err
}
_, err = codegurureviewer.NewRepositoryAssociation(ctx, "myRepositoryAssociation", &codegurureviewer.RepositoryAssociationArgs{
Name: pulumi.String("MyRepositoryName"),
Type: codegurureviewer.RepositoryAssociationTypeCodeCommit,
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const myRepository = new aws_native.codecommit.Repository("myRepository", {repositoryName: "MyRepositoryName"});
const myRepositoryAssociation = new aws_native.codegurureviewer.RepositoryAssociation("myRepositoryAssociation", {
name: "MyRepositoryName",
type: aws_native.codegurureviewer.RepositoryAssociationType.CodeCommit,
});
import pulumi
import pulumi_aws_native as aws_native
my_repository = aws_native.codecommit.Repository("myRepository", repository_name="MyRepositoryName")
my_repository_association = aws_native.codegurureviewer.RepositoryAssociation("myRepositoryAssociation",
name="MyRepositoryName",
type=aws_native.codegurureviewer.RepositoryAssociationType.CODE_COMMIT)
Example coming soon!
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,
code: Optional[RepositoryCodeArgs] = None,
kms_key_id: Optional[str] = None,
repository_description: Optional[str] = None,
repository_name: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
triggers: Optional[Sequence[RepositoryTriggerArgs]] = 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: aws-native:codecommit:Repository
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws-native_codecommit_repository" "name" {
# resource properties
}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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Repository resource accepts the following input properties:
- Code
Pulumi.
Aws Native. Code Commit. Inputs. Repository Code - Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
- Kms
Key stringId - The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
- Repository
Description string - A comment or description about the new repository.
- Repository
Name string - The name of the new repository to be created.
-
List<Pulumi.
Aws Native. Inputs. Tag> - One or more tag key-value pairs to use when tagging this repository.
- Triggers
List<Pulumi.
Aws Native. Code Commit. Inputs. Repository Trigger> - Information about a trigger for a repository.
- Code
Repository
Code Args - Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
- Kms
Key stringId - The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
- Repository
Description string - A comment or description about the new repository.
- Repository
Name string - The name of the new repository to be created.
-
Tag
Args - One or more tag key-value pairs to use when tagging this repository.
- Triggers
[]Repository
Trigger Args - Information about a trigger for a repository.
- code object
- Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
- kms_
key_ stringid - The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
- repository_
description string - A comment or description about the new repository.
- repository_
name string - The name of the new repository to be created.
- list(object)
- One or more tag key-value pairs to use when tagging this repository.
- triggers list(object)
- Information about a trigger for a repository.
- code
Repository
Code - Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
- kms
Key StringId - The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
- repository
Description String - A comment or description about the new repository.
- repository
Name String - The name of the new repository to be created.
- List<Tag>
- One or more tag key-value pairs to use when tagging this repository.
- triggers
List<Repository
Trigger> - Information about a trigger for a repository.
- code
Repository
Code - Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
- kms
Key stringId - The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
- repository
Description string - A comment or description about the new repository.
- repository
Name string - The name of the new repository to be created.
- Tag[]
- One or more tag key-value pairs to use when tagging this repository.
- triggers
Repository
Trigger[] - Information about a trigger for a repository.
- code
Repository
Code Args - Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
- kms_
key_ strid - The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
- repository_
description str - A comment or description about the new repository.
- repository_
name str - The name of the new repository to be created.
-
Sequence[Tag
Args] - One or more tag key-value pairs to use when tagging this repository.
- triggers
Sequence[Repository
Trigger Args] - Information about a trigger for a repository.
- code Property Map
- Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
- kms
Key StringId - The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
- repository
Description String - A comment or description about the new repository.
- repository
Name String - The name of the new repository to be created.
- List<Property Map>
- One or more tag key-value pairs to use when tagging this repository.
- triggers List<Property Map>
- Information about a trigger for a repository.
Outputs
All input properties are implicitly available as output properties. Additionally, the Repository resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) of the repository.
- Clone
Url stringHttp - The URL to use for cloning the repository over HTTPS.
- Clone
Url stringSsh - The URL to use for cloning the repository over SSH.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The repository's name.
- Repository
Id string - The ID of the repository.
- Arn string
- The Amazon Resource Name (ARN) of the repository.
- Clone
Url stringHttp - The URL to use for cloning the repository over HTTPS.
- Clone
Url stringSsh - The URL to use for cloning the repository over SSH.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The repository's name.
- Repository
Id string - The ID of the repository.
- arn string
- The Amazon Resource Name (ARN) of the repository.
- clone_
url_ stringhttp - The URL to use for cloning the repository over HTTPS.
- clone_
url_ stringssh - The URL to use for cloning the repository over SSH.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The repository's name.
- repository_
id string - The ID of the repository.
- arn String
- The Amazon Resource Name (ARN) of the repository.
- clone
Url StringHttp - The URL to use for cloning the repository over HTTPS.
- clone
Url StringSsh - The URL to use for cloning the repository over SSH.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The repository's name.
- repository
Id String - The ID of the repository.
- arn string
- The Amazon Resource Name (ARN) of the repository.
- clone
Url stringHttp - The URL to use for cloning the repository over HTTPS.
- clone
Url stringSsh - The URL to use for cloning the repository over SSH.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The repository's name.
- repository
Id string - The ID of the repository.
- arn str
- The Amazon Resource Name (ARN) of the repository.
- clone_
url_ strhttp - The URL to use for cloning the repository over HTTPS.
- clone_
url_ strssh - The URL to use for cloning the repository over SSH.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The repository's name.
- repository_
id str - The ID of the repository.
- arn String
- The Amazon Resource Name (ARN) of the repository.
- clone
Url StringHttp - The URL to use for cloning the repository over HTTPS.
- clone
Url StringSsh - The URL to use for cloning the repository over SSH.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The repository's name.
- repository
Id String - The ID of the repository.
Supporting Types
RepositoryCode, RepositoryCodeArgs
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.- S3
Pulumi.
Aws Native. Code Commit. Inputs. Repository S3 - Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.
- Branch
Name string - Optional. Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.
- S3
Repository
S3 - Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.
- Branch
Name string - Optional. Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.
- s3 object
- Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.
- branch_
name string - Optional. Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.
- s3
Repository
S3 - Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.
- branch
Name String - Optional. Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.
- s3
Repository
S3 - Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.
- branch
Name string - Optional. Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.
- s3
Repository
S3 - Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.
- branch_
name str - Optional. Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.
- s3 Property Map
- Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.
- branch
Name String - Optional. Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.
RepositoryS3, RepositoryS3Args
Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.- Bucket string
- The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository. This can be specified using the name of the bucket in the AWS account. Changes to this property are ignored after initial resource creation.
- Key string
- The key to use for accessing the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- Object
Version string - The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- Bucket string
- The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository. This can be specified using the name of the bucket in the AWS account. Changes to this property are ignored after initial resource creation.
- Key string
- The key to use for accessing the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- Object
Version string - The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- bucket string
- The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository. This can be specified using the name of the bucket in the AWS account. Changes to this property are ignored after initial resource creation.
- key string
- The key to use for accessing the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- object_
version string - The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- bucket String
- The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository. This can be specified using the name of the bucket in the AWS account. Changes to this property are ignored after initial resource creation.
- key String
- The key to use for accessing the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- object
Version String - The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- bucket string
- The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository. This can be specified using the name of the bucket in the AWS account. Changes to this property are ignored after initial resource creation.
- key string
- The key to use for accessing the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- object
Version string - The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- bucket str
- The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository. This can be specified using the name of the bucket in the AWS account. Changes to this property are ignored after initial resource creation.
- key str
- The key to use for accessing the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- object_
version str - The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- bucket String
- The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository. This can be specified using the name of the bucket in the AWS account. Changes to this property are ignored after initial resource creation.
- key String
- The key to use for accessing the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
- object
Version String - The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.
RepositoryTrigger, RepositoryTriggerArgs
Information about a trigger for a repository.- Destination
Arn string - The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
- Events List<string>
- The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
- Name string
- The name of the trigger.
- Branches List<string>
- The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
- Custom
Data string - Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
- Destination
Arn string - The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
- Events []string
- The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
- Name string
- The name of the trigger.
- Branches []string
- The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
- Custom
Data string - Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
- destination_
arn string - The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
- events list(string)
- The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
- name string
- The name of the trigger.
- branches list(string)
- The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
- custom_
data string - Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
- destination
Arn String - The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
- events List<String>
- The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
- name String
- The name of the trigger.
- branches List<String>
- The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
- custom
Data String - Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
- destination
Arn string - The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
- events string[]
- The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
- name string
- The name of the trigger.
- branches string[]
- The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
- custom
Data string - Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
- destination_
arn str - The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
- events Sequence[str]
- The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
- name str
- The name of the trigger.
- branches Sequence[str]
- The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
- custom_
data str - Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
- destination
Arn String - The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).
- events List<String>
- The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.
- name String
- The name of the trigger.
- branches List<String>
- The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches.
- custom
Data String - Any custom data associated with the trigger to be included in the information sent to the target of the trigger.
Tag, TagArgs
A set of tags to apply to the resource.Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 14, 2026 by Pulumi