CodeCommit Repository
π¦ Overviewβ
This Terraform module provisions a private AWS CodeCommit Git repository, giving your team secure, AWS-native source control that integrates seamlessly with your cloud infrastructure.
Itβs ideal for managing infrastructure as code, internal tools, and application source code in a secure, centralized Git environment.
β Key Featuresβ
- Creates a fully managed, private AWS CodeCommit repository
- Supports custom repository names and descriptions
- Enables tagging for environment, owner, or application grouping
- Designed for secure Git-based collaboration inside AWS
πΌ Use Casesβ
- Hosting Terraform, CloudFormation, or other infrastructure code
- Internal tooling and microservices codebases
- Source control for serverless apps or container configs
- Pipelines that require Git-hosted triggers inside AWS
π₯ Input Variablesβ
| Name | Type | Description |
|---|---|---|
region | string | AWS region to deploy the CodeCommit repository |
repository_name | string | The name of the CodeCommit repository |
description | string | (Optional) Description of the repository |
environment | string | Tag to specify the deployment environment (e.g., dev, staging) |
π€ Outputsβ
| Name | Description |
|---|---|
repository_name | The name of the created CodeCommit repository |
repository_clone_url_http | The HTTP clone URL for the repository |
repository_clone_url_ssh | The SSH clone URL for the repository |
π Deployment Readinessβ
- β Compatible with Terraform 1.0+
- β Tested with AWS provider 5.x
- π§ͺ Requires IAM permissions to manage CodeCommit resources
π οΈ Example Usageβ
module "codecommit_repo" {
source = "git::ssh://git@github.com/archiphire/aws-level-1-modules.git//developer-utilities/codecommit-repo?ref=v1.0.0"
region = "us-east-1"
repository_name = "my-private-repo"
description = "Infrastructure code for internal projects"
environment = "dev"
}
terraform init
terraform plan
terraform apply
or
or
tofu init
tofu plan
tofu apply
π§Ή Cleanup Optionsβ
For testing:
terraform destroy
or
tofu destroy
For production:
Manually delete the repository via the AWS Console or CLI if it's integrated with automation workflows or shared with other teams.
π‘οΈ Notesβ
This is a Level 1 developer utility module for creating private CodeCommit repositories. For CI/CD automation, permission boundaries, or workflow orchestration, pair this with modules for IAM policies, CodeBuild, or CodePipeline.
π Deployment Package Noticeβ
This module is part of the Level 1 AWS License Tier. To access the full deployment package and source code, subscribe to Archiphire.