Skip to content

Instantly share code, notes, and snippets.

@albertywu
Last active May 19, 2022 01:52
Show Gist options
  • Select an option

  • Save albertywu/cae2698bba99cf6fac8c48143f8e0004 to your computer and use it in GitHub Desktop.

Select an option

Save albertywu/cae2698bba99cf6fac8c48143f8e0004 to your computer and use it in GitHub Desktop.

using latest version 0.9.0

  1. works without cluster_id
resource "buildkite_pipeline" "wua-test-no-cluster" {
  name = "wua-testing-no-cluster"
  description = "testing creating a pipeline without cluster"
  repository = "gitolite@code.uber.internal:mobile/android"
  default_branch = "main"
  steps = file("./pipelines/mobile-release/metro-minion-build-release-apk-android.yml")
  team {
    slug = module.teams.engineering.slug
    access_level = "READ_ONLY"
  }
  team {
    slug = module.teams.mobile-release.slug
    access_level = "MANAGE_BUILD_AND_READ"
  }
}

terraform apply -target=buildkite_pipeline.wua-test-no-cluster

Success.


  1. fails with cluster_id
resource "buildkite_pipeline" "wua-test-cluster" {
  name = "wua-testing-cluster"
  description = "testing creating a pipeline on the odin cluster"
  repository = "gitolite@code.uber.internal:mobile/android"
  default_branch = "main"
  steps = file("./pipelines/mobile-release/metro-minion-build-release-apk-android.yml")
  team {
    slug = module.teams.engineering.slug
    access_level = "READ_ONLY"
  }
  team {
    slug = module.teams.mobile-release.slug
    access_level = "MANAGE_BUILD_AND_READ"
  }
  cluster_id = "Q2x1c3Rlci0tLTk3YTY3YzQ0LTYzNDgtNDA0Zi1hM2E4LTRjZmIzNzZjNWM0MA=="
}

terraform apply -target=buildkite_pipeline.wua-test-cluster

fails with the following error:

│ Error: Variable $allow_rebuilds is declared by  but not used
│ 
│   with buildkite_pipeline.wua-test-cluster,
│   on main.tf line 3161, in resource "buildkite_pipeline" "wua-test-cluster":
│ 3161: resource "buildkite_pipeline" "wua-test-cluster" {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment