hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.76k stars 9.12k forks source link

Support for CodeBuild Triggers #12188

Closed pgieser closed 3 years ago

pgieser commented 4 years ago

Community Note

Description

Support for managing CodeBuild triggers.

New or Affected Resource(s)

CodeBuild triggers.

Potential Terraform Configuration

resource "aws_codebuild_trigger" "trigger" {
  project_name = ""

  name = ""
  description = ""

  frequency {
    type = "Hourly|Daily|Weekly|Custom"
    start_minute = "" // (Hourly|Daily|Weekly)
    start_hour = "" // (Daily|Weekly)
    start_day = "" // (Weekly)
    cron = "" // (Custom)
  }

  enabled = false

  advanced {
    source_version = ""
    hours = ""
    minutes = ""
  }
}

References

jdyke commented 4 years ago

I ran into this and got it working by using a aws_cloudwatch_event_rule and a aws_cloudwatch_event_target pointing to the codebuild ARN. CodeBuild triggers are event rules behind the scenes.

breathingdust commented 3 years ago

I believe this can be closed, as CodeBuild triggers are configured via EventBridge. From AWS docs:

CodeBuild uses Amazon EventBridge rules for build triggers. You can use the EventBridge API to programmatically edit the build triggers for your CodeBuild projects. See Amazon EventBridge API Reference for more information.

github-actions[bot] commented 2 years ago

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.