Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for AWS CodeBuild Webhook Filter #7503

Closed
ghost opened this issue Feb 11, 2019 · 5 comments · Fixed by #8110
Closed

Support for AWS CodeBuild Webhook Filter #7503

ghost opened this issue Feb 11, 2019 · 5 comments · Fixed by #8110
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service.
Milestone

Comments

@ghost
Copy link

ghost commented Feb 11, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

This issue was originally opened by @OfirYaron as hashicorp/terraform#20289. It was migrated here as a result of the provider split. The original body of the issue is below.


AWS introduced a new feature for their CI/CD pipeline - CodeBuild:

long waited Github Webhook Filter - to allow further filtering of the webhook by some of it's payload content
it give the ability to decide what condition are met before triggering the build process.

feature specifications:
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-pull-request.html#sample-github-pull-request-filter-webhook-events

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service. labels Feb 11, 2019
@bflad bflad changed the title Support for AWS Webhook Filter Support for AWS CodeBuild Webhook Filter Feb 11, 2019
@OfirYaron
Copy link

The previous 'branch filter' field was removed from the UI which probably indicate that the AWS API will deprecate it as well.

I'm trying to migrate my Webhooks branch filter to use filter-webhook-events but terraform is still missing that feature, is this on the roadmap? any idea on when it will be delivered?

fyi, since the removal from the UI there are weird side effect for the code build, I'm getting two Webhooks instead of one and both fail on PING

@bflad
Copy link
Contributor

bflad commented Jun 6, 2019

Support for this functionality has been merged and will release with version 2.14.0 of the Terraform AWS Provider, very shortly! Thanks to @tomkuehl!

@bflad
Copy link
Contributor

bflad commented Jun 7, 2019

This has been released in version 2.14.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@bflad
Copy link
Contributor

bflad commented Jun 7, 2019

resource "aws_codebuild_webhook" "example" {
  project_name = "${aws_codebuild_project.example.name}"

  filter_group {
    filter {
      type    = "EVENT"
      pattern = "PUSH"
    }

    filter {
      type                    = "HEAD_REF"
      pattern                 = "refs/heads/master"
      exclude_matched_pattern = true
    }
  }

  filter_group {
    filter {
      type    = "EVENT"
      pattern = "PULL_REQUEST_UPDATED"
    }
  }
}

@ghost
Copy link
Author

ghost commented Nov 3, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants