Skip to content

Resource: awsCodecommitRepository

Provides a CodeCommit Repository Resource.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.codecommitRepository.CodecommitRepository(this, "test", {
  description: "This is the Sample App Repository",
  repositoryName: "MyTestRepository",
});

Argument Reference

The following arguments are supported:

  • repositoryName - (Required) The name for the repository. This needs to be less than 100 characters.
  • description - (Optional) The description of the repository. This needs to be less than 1000 characters
  • defaultBranch - (Optional) The default branch of the repository. The branch specified here needs to exist.
  • tags - (Optional) Key-value map of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • repositoryId - The ID of the repository
  • arn - The ARN of the repository
  • cloneUrlHttp - The URL to use for cloning the repository over HTTPS.
  • cloneUrlSsh - The URL to use for cloning the repository over SSH.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

Codecommit repository can be imported using repository name, e.g.,

$ terraform import aws_codecommit_repository.imported ExistingRepo