Triggering AWS codepipeline with regex matching tag push with terraform

46 views Asked by At

I have a problem to setting config terraform with trigger CodePipeline, I can't find config terraform, I use AWS CodePipeline with V2

enter image description here

I tried this config, Don't work

resource "aws_codepipeline_webhook" "gitlab_webhook" {
  name               = "gitlab-webhook"
  authentication     = "UNAUTHENTICATED" # GitLab webhook also uses GITHUB_HMAC authentication method
  target_pipeline    = aws_codepipeline.codepipeline.name
  target_action      = "Source"

  filter {
    json_path    = "$.ref"
    match_equals = "refs/heads/main"
  }
}
0

There are 0 answers