AWS Codepipeline and repo change detection in Terraform
Published in
Nov 10, 2022
Here is some Terraform and AWS hint for today.)
Ok so let’s start with my hint number 1.
When we create a Codepipeline we will have to choose a change detection option for our repo:
When we use Cloudwatch events we have 2 options:
- Add a rule to Eventbridge.
- Don’t add a rule to Eventbridge.
It is pretty clear in a console, but how to do it via Terraform. In Terraform you should add PollForSourceChanges = “false” to your configuration of a Codepipeline. Example:
By using this way, you will switch off an automatic change detection, so you can add your custom one Eventbridge rule.
That’s all.