buildkite / terraform-provider-buildkite

Terraform provider for Buildkite
https://registry.terraform.io/providers/buildkite/buildkite/latest
MIT License
56 stars 34 forks source link

Cannot create and sign a pipeline in a single apply, pipeline must be created without signing and then updated to add signing #502

Closed fivetran-seanmeisner closed 7 months ago

fivetran-seanmeisner commented 7 months ago

This is following up on ongoing discussion with Buildkite support.

In a system where we have added signing to existing pipelines, we are now faced with an issue where we can't create and sign a pipeline in a single Terraform apply.

The error looks like this:

Error: Provider produced invalid plan

Provider "registry.terraform.io/buildkite/buildkite" planned an invalid value
for buildkite_pipeline.uitests_pipeline.steps: planned value
cty.StringVal("steps:\n- label: ':pipeline: Pipeline Upload'\n  command:
buildkite-agent pipeline upload") does not match config value
cty.UnknownVal(cty.String).

This is a bug in the provider, which should be reported in the provider's own issue tracker.

It's been suggested that this issue is related to these changes: https://github.com/buildkite/terraform-provider-buildkite/pull/474

jradtilbrook commented 7 months ago

Thanks for raising this here to track publicly 👍

I'm trying to put together a fix for this, but I'm not able to reproduce it. I've tried to add a minimal reproduction to tests in this PR but the tests are passing showing that a new pipeline is created with signed steps. I'm not sure where the problem is

jradtilbrook commented 7 months ago

We took this privately so we could share some more context and have since sorted it. We don't currently believe there is an issue in the provider.

If someone comes across something similar again, please reopen another issue and you can reference this one