Typically when you run into an error like this, it’s because the token you are using is missing the correct scopes when using our Terraform Provider.
Because you have tested curling the API (our REST API), I’m going to assume you’ve given read_pipelines, but you’ll want to check that you also have the write_pipelines and write_suites scopes turned on for REST, as well as the token you are using has been enabled for GraphQL API access, as seen here: GitHub - buildkite/terraform-provider-buildkite: Terraform provider for Buildkite. All of these scopes are required for the Terraform Provider to function.
We have also done some work to the provider and released on the newer 1.0.x version now, which we’ve updated the provider docs here: Terraform Registry if you’re curious to see the latest changes and documentation surrounding the new release.
Do you have Test Analytics enabled? If so, that becomes a required scope to write to suites, but if not you can omit that scope and attempt your terraform plan again with the other 3 and that should work for you.
So you’ll want to enable: read_pipelines, write_pipelines and also check off the GraphQL API access for that token for your terraform plan to work. This is assuming you do not have Test Analytics enabled. I’ve attached a screenshot below.
Oh no, that’s not expected! Can you do me a favour and send in an email to us at email@example.com, sharing the name of organization you’re a part of and we’ll take a look on our end to see what’s going wrong.