Skip to content

A Terraform module that watches a CodeCommit repo. When activity is detected, it triggers a CodePipeline

License

Notifications You must be signed in to change notification settings

Dzhuneyt/terraform-cloudwatch-trigger-codepipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A terraform module that helps you to provision a CloudWatch event that listens for activity on a given CodeCommit repo's branch and automatically triggers a CodePipeline.

More information is available on this guide: https://docs.aws.amazon.com/codepipeline/latest/userguide/triggering.html

If you use this module, make sure to set PollForSourceChanges=false, to avoid double triggering of the CodePipeline.

Example usage:

module "cloudwatch_triggers_codepipeline" {
  source = "github.com/Dzhuneyt/terraform-cloudwatch-trigger-codepipeline?ref=0.0.1"
  aws_region = "eu-west-1"
  branch_to_monitor = "develop"
  codecommit_repo_arn = data.aws_codecommit_repository.my_repo.arn
  codepipeline_arn = aws_codepipeline.codepipeline_develop.arn
  tag = "example"
}

Make sure you point it to existing CodeCommit repos and CodePipeline instances:

data "aws_codecommit_repository" "my_repo" {
  repository_name = "Repo-Name-Here"
}

resource "aws_codepipeline" "codepipeline_develop" {
  # .. Definition here
}

About

A Terraform module that watches a CodeCommit repo. When activity is detected, it triggers a CodePipeline

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages