AWS CodeCommit Repository

This page shows how to write Terraform and CloudFormation for CodeCommit Repository and write them securely.

aws_codecommit_repository (Terraform)

The Repository in CodeCommit can be configured in Terraform with the resource name aws_codecommit_repository. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L8
resource "aws_codecommit_repository" "default" {
  repository_name = var.repository_name
  description     = var.description
}

resource "aws_codecommit_repository" "frontend" {
codecommit.tf#L1
resource "aws_codecommit_repository" "customer-service" {
  repository_name = "customer-service-repository"
  description     = "Customer Service App Repository"
}
resource "aws_codecommit_repository" "customer-frontend-service" {
  repository_name = "customer-frontend-service-repository"
main.tf#L1
resource "aws_codecommit_repository" "git_repository" {
  repository_name = "my-webpage"
  description = "This is my webpage repostory for cicd-demo"
}

//notification

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a CodeCommit Repository Resource.

AWS::CodeCommit::Repository (CloudFormation)

The Repository in CodeCommit can be configured in CloudFormation with the resource name AWS::CodeCommit::Repository. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

Creates a new, empty repository.

Frequently asked questions

What is AWS CodeCommit Repository?

AWS CodeCommit Repository is a resource for CodeCommit of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS CodeCommit Repository?

For Terraform, the Matsushin/todo-infra, ramanjeemishra/aws-tf-sb-a8-e2e-demo and LuisCusihuaman/SRE source code examples are useful. See the Terraform Example section for further details.