Skip to main content

CodePipeline (Empty)

πŸ“¦ Overview​

This Terraform module provisions an empty AWS CodePipeline, giving your team a flexible starting point to build modular CI/CD workflows.

With no predefined stages, it’s designed as a reusable pipeline skeleton that integrates cleanly with higher-level automation.


βœ… Key Features​

  • Creates a named CodePipeline with no initial stages
  • Supports configurable artifact bucket and optional KMS encryption
  • Provides a blank canvas for custom stage injection and orchestration
  • Designed for teams building modular or dynamic CI/CD frameworks

πŸ’Ό Use Cases​

  • Creating reusable pipeline infrastructure across projects
  • Integrating with custom Terraform or script-based stage injectors
  • Laying the foundation for environment-specific delivery logic
  • Advanced CI/CD systems that define stages separately or dynamically

πŸ“₯ Input Variables​

NameTypeDescription
regionstringAWS region to deploy the CodePipeline
pipeline_namestringName of the pipeline to be created
artifact_bucketstringName of the S3 bucket to use for artifact storage
service_role_arnstringARN of the IAM role for CodePipeline execution
environmentstringTag to specify the deployment environment (e.g., dev, staging)

πŸ“€ Outputs​

NameDescription
pipeline_nameThe name of the created CodePipeline
pipeline_arnThe ARN of the CodePipeline
artifact_store_locationThe S3 bucket used for artifact storage

πŸš€ Deployment Readiness​

  • βœ… Compatible with Terraform 1.0+
  • βœ… Tested with AWS provider 5.x
  • πŸ§ͺ Requires an artifact bucket and IAM service role

πŸ› οΈ Example Usage​

module "codepipeline_empty" {
source = "git::ssh://git@github.com/archiphire/aws-level-1-modules.git//developer-utilities/codepipeline-empty?ref=v1.0.0"

region = "us-east-1"
pipeline_name = "my-empty-pipeline"
artifact_bucket = "my-artifact-bucket"
service_role_arn = "arn:aws:iam::123456789012:role/codepipeline-role"
environment = "dev"
}
terraform init
terraform plan
terraform apply

or

tofu init
tofu plan
tofu apply

🧹 Cleanup Options​

For testing:

terraform destroy

or

tofu destroy

For production:

Manually delete the CodePipeline via the AWS Console or CLI if it’s integrated with automation or stage-specific dependencies.

πŸ›‘οΈ Notes​

This is a Level 1 developer utility module that provides a barebones CodePipeline. Use it as a skeleton for injecting stages via modules like CodeBuild, Lambda, or deployment logic β€” giving your DevOps team maximum flexibility in pipeline design.

πŸ”’ 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.