You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was trying out Buildkite for the first time and setting it up using the official Terraform provider. I got a cluster, agent and pipeline setup with access to my GitHub repo but was having trouble getting jobs to actually trigger on my pull request (only had success triggering new builds manually from the Buildkite web app).
build_branches (Boolean) Whether to create builds when branches are pushed. Defaults to true when trigger_mode is set to code.
build_pull_requests (Boolean) Whether to create builds for commits that are part of a pull request. Defaults to true when trigger_mode is set to code.
Based on this, I was under the impression that all I needed for my provider settings to enable my desired pipeline triggers was:
provider_settings={
trigger_mode ="code"
}
After debugging for some time I discovering in the UI what the actual values were. The "trigger builds after pushing code" section was enabled, but no sub-options, like "build pull requests" were enabled.
So it appears that the buildkite_pipeline resource is actually setting these options to false as the default.
To Reproduce
Steps to reproduce the behavior:
Create a buildkite_pipeline with provider_settings.trigger_mode = "code", omitting other options
Apply... (I did go through several iterations of apply resources while learning about the available settings)
View terraform state for the created pipeline (i.e. terraform state show buildkite_pipeline.example)
Expected behavior
Either the TF provider settings docs should be updated to reflect the actual defaults (false), or the resource should be updated to set build_branches, build_pull_requests, publish_commit_status and skip_pull_request_builds_for_existing_commits as true by default when trigger_mode is "code", as suggested by the current docs.
Additional context
Terraform and provider versions used:
❯ terraform version
Terraform v1.10.3
on darwin_arm64
+ provider registry.terraform.io/buildkite/buildkite v1.15.1
The text was updated successfully, but these errors were encountered:
erikkrieg
changed the title
In accuracies in Buildkite Terraform provider docs.
Inaccuracies in Buildkite Terraform provider docs.
Dec 23, 2024
erikkrieg
changed the title
Inaccuracies in Buildkite Terraform provider docs.
buildkite_pipeline provider settings docs appear to be incorrect concerning some default values
Dec 23, 2024
Describe the bug
I was trying out Buildkite for the first time and setting it up using the official Terraform provider. I got a cluster, agent and pipeline setup with access to my GitHub repo but was having trouble getting jobs to actually trigger on my pull request (only had success triggering new builds manually from the Buildkite web app).
When reading over settings in the TF docs, I saw:
Based on this, I was under the impression that all I needed for my provider settings to enable my desired pipeline triggers was:
After debugging for some time I discovering in the UI what the actual values were. The "trigger builds after pushing code" section was enabled, but no sub-options, like "build pull requests" were enabled.
So it appears that the
buildkite_pipeline
resource is actually setting these options tofalse
as the default.To Reproduce
Steps to reproduce the behavior:
buildkite_pipeline
withprovider_settings.trigger_mode = "code"
, omitting other optionsterraform state show buildkite_pipeline.example
)Expected behavior
Either the TF provider settings docs should be updated to reflect the actual defaults (
false
), or the resource should be updated to setbuild_branches
,build_pull_requests
,publish_commit_status
andskip_pull_request_builds_for_existing_commits
astrue
by default when trigger_mode is"code"
, as suggested by the current docs.Additional context
Terraform and provider versions used:
The text was updated successfully, but these errors were encountered: