# Official Terraform Plugin

**URL:** <https://forum.buildkite.community/t/official-terraform-plugin/555>\
**Category:** Features Requests\
**Created:** [June 15, 2019, 12:09am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555 "2019-06-15T00:09:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianwremmel](https://avatars.discourse-cdn.com/v4/letter/i/839c29/32.png) [@ianwremmel](https://forum.buildkite.community/u/ianwremmel)\
**Post date:** [June 15, 2019, 12:09am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/1 "2019-06-15T00:09:36Z")

</div>

There are a few Buildkite Terraform providers out there in varying levels of maintenance:

> **[saymedia/terraform-buildkite](https://github.com/saymedia/terraform-buildkite)**
>
> Terraform provider for Buildkite (work in progress) - saymedia/terraform-buildkite

  

> **[yougroupteam/terraform-buildkite](https://github.com/yougroupteam/terraform-buildkite)**
>
> Terraform provider for buildkite. Contribute to yougroupteam/terraform-buildkite development by creating an account on GitHub.

They seem to be pretty much feature complete (at least as far as configuring pipelines), but buggy and lacking in documentation. Any chance of adopting and maintaining one of them as a formal part of the Buildkite product?

---

<div class="post-metadata">

**Author:** ![anon18197598](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@anon18197598](https://forum.buildkite.community/u/anon18197598)\
**Post date:** [June 17, 2019, 8:15am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/2 "2019-06-17T08:15:46Z")

</div>

We’ve been talking about this internally, and we’d love to do it, but at the minute we don’t have the bandwidth. Would happily work with any maintainers that sprung up though!

---

<div class="post-metadata">

**Author:** ![ianwremmel](https://avatars.discourse-cdn.com/v4/letter/i/839c29/32.png) [@ianwremmel](https://forum.buildkite.community/u/ianwremmel)\
**Post date:** [June 17, 2019, 8:37pm UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/3 "2019-06-17T20:37:07Z")

</div>

I think one of the big hurdles for maintainers is testing. The links I listed include a bunch of acceptance tests that need to talk to a real buildkite server. Moreover, I had to fix a bug this weekend because a new field in the api wasn’t known to the provider.

Have you considered running a buildkite service (or mock service) that community members can test against?

If there were a community supported provider that was clearly ahead of the rest, it would be nice to know that api changes from y’all wouldn’t break it.

(Admittedly, I know almost nothing about Go; it seems to be the ideal would be for the provider to not break if it receives an unknown key)

(My apologies…this got a lot more stream-of-consciousness than I intended)

---

<div class="post-metadata">

**Author:** ![anon18197598](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@anon18197598](https://forum.buildkite.community/u/anon18197598)\
**Post date:** [June 18, 2019, 1:47am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/4 "2019-06-18T01:47:24Z")

</div>

There is also [https://github.com/COzero/terraform-provider-buildkite](https://github.com/COzero/terraform-provider-buildkite)

Ideally, I think a terraform provider would use our GraphQL API. It’s symmetrical, so you can get back out what you put in, which will solve a lot of the problems. It should be easier to mock for testing too.

I recall someone point one out, I’ll look for it.

---

<div class="post-metadata">

**Author:** ![jmharvey](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jmharvey](https://forum.buildkite.community/u/jmharvey)\
**Post date:** [August 16, 2019, 12:07am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/5 "2019-08-16T00:07:18Z")

</div>

Of the three mentioned on this thread, the `yougroupteam/terraform-buildkite` project is working the best for us so far.

> [@anon18197598](#):
>
> Ideally, I think a terraform provider would use our GraphQL API

My concern here is that the GraphQL API tokens don’t have granular permissions at this point. Granted, from a security perspective, `read_pipelines` and `write_pipelines` are already pretty powerful permissions, but it’s still nice to have granular permissions when possible.

---

<div class="post-metadata">

**Author:** ![anon18197598](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@anon18197598](https://forum.buildkite.community/u/anon18197598)\
**Post date:** [September 23, 2019, 11:55am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/6 "2019-09-23T11:55:08Z")

</div>

> [@jmharvey](#):
>
> My concern here is that the GraphQL API tokens don’t have granular permissions at this point. Granted, from a security perspective, `read_pipelines` and `write_pipelines` are already pretty powerful permissions, but it’s still nice to have granular permissions when possible.

Agreed, although this is something that will be solved in future.

---

<div class="post-metadata">

**Author:** ![jufemaiz](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/jufemaiz/32/1693_2.png) [@jufemaiz](https://forum.buildkite.community/u/jufemaiz)\
**Post date:** [November 6, 2019, 5:19am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/7 "2019-11-06T05:19:46Z")

</div>

Just FYI COzero is dead, having been name changed, company changed (to EnergyLink) and finally placed into administration + liquidation.

Consider it unsupported.

---

<div class="post-metadata">

**Author:** ![anon46008679](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@anon46008679](https://forum.buildkite.community/u/anon46008679)\
**Post date:** [November 6, 2019, 7:23am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/8 "2019-11-06T07:23:06Z")

</div>

Eep! Thanks for the heads up.

---

<div class="post-metadata">

**Author:** ![slucero](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/slucero/32/666_2.png) [@slucero](https://forum.buildkite.community/u/slucero)\
**Post date:** [April 3, 2020, 10:42am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/9 "2020-04-03T10:42:23Z")

</div>

I’m late joining this thread, but I wanted to add in the note for anybody else looking that the saymedia repo seems to no longer be maintained and the yougroupteam project was actually forked off of it.

This is described in the Readme for the yougroupteam repo:

> ## Originally forked from yougroupteam/terraform-buildkite
> 
> This provider is originally forked from `saymedia/terraform-buildkite` . However, since there’s no maintainer from `saymedia` anymore we have now duplicated the repo instead to ensure contributed changes can be adopted buy the community.
> 
> See [[Is anyone maintaining this repo? · Issue #25 · saymedia/terraform-buildkite · GitHub](https://github.com/saymedia/terraform-buildkite/issues/25)] for details.

With that noted, these are the two plugin repos that seem most likely to still be maintained:

> **[GitHub - yougroupteam/terraform-buildkite: Terraform provider for buildkite](https://github.com/yougroupteam/terraform-buildkite)**
>
> Terraform provider for buildkite. Contribute to yougroupteam/terraform-buildkite development by creating an account on GitHub.

> **[GitHub - jradtilbrook/terraform-provider-greatest: Terraform provider for...](https://github.com/jradtilbrook/terraform-provider-greatest)**
>
> Terraform provider for Buildkite. Contribute to jradtilbrook/terraform-provider-greatest development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![lymandetl](https://avatars.discourse-cdn.com/v4/letter/l/da6949/32.png) [@lymandetl](https://forum.buildkite.community/u/lymandetl)\
**Post date:** [October 30, 2020, 3:02pm UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/10 "2020-10-30T15:02:27Z")

</div>

I see activity on this official buildkite repo now.

> **[buildkite/terraform-buildkite](https://github.com/buildkite/terraform-buildkite)**
>
> Terraform provider for Buildkite (work in progress) - buildkite/terraform-buildkite

Is this planned sometime soon? 😄

---

<div class="post-metadata">

**Author:** ![Rose](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/rose/32/834_2.png) [@Rose](https://forum.buildkite.community/u/Rose)\
**Post date:** [November 2, 2020, 3:08am UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/11 "2020-11-02T03:08:26Z")

</div>

Hey @lymandetl!

Good spotting! Our rough plan at the moment is to work with an author of one of the existing community Terraform providers, adopt their provider (probably by forking it into our GitHub org), give it a once over for obvious defects, polish the README, and add it to the terraform registry.

No current updates on when that will be done though!

---

<div class="post-metadata">

**Author:** ![anon8263991](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@anon8263991](https://forum.buildkite.community/u/anon8263991)\
**Post date:** [December 18, 2020, 11:33pm UTC](https://forum.buildkite.community/t/official-terraform-plugin/555/12 "2020-12-18T23:33:39Z")

</div>

Hi folks,

We’ve officially adopted jradtilbrook’s provider and published it to the [terraform registery](https://registry.terraform.io/providers/buildkite/buildkite/latest).

We support terraform 0.13 and up, where the required\_providers block became available:

```
terraform {
  required_providers {
    buildkite = {
      source = "buildkite/buildkite"
      version = "0.0.17"
    }
  }
}

provider "buildkite" {
  api_token = "token"
  organization = "slug" # can also be set from env: BUILDKITE_ORGANIZATION

}

```

The source code is [on GitHub](https://github.com/buildkite/terraform-provider-buildkite) and we hope it’s the foundation we need to start supporting more resources. Contributions are welcome! ❤
