spacelift-io / terraform-provider-spacelift

Terraform provider to interact with Spacelift
MIT License
76 stars 29 forks source link

terraform-spacelift-msteams no longer works with new provider updates #543

Closed jstrese closed 3 months ago

jstrese commented 6 months ago

When trying to deploy the msteams integration provided by Spacelift, we are no longer able to successfully deploy on the latest provider version. If we roll back to 1.8, it gets successfully deployed.

Note: Posting this issue here as it's a provider issue it seems. The msteams repository also appears to be abandoned with no responses to reported issues.

Error:

│ Error: could not create policy MS Teams Integration (my-app-REDACTEDID): Unknown type "PolicyCreateInput"., Variable "$input" cannot be non-input type %!q(<nil>)., Cannot query field "policyCreatev2" on type "Mutation". Did you mean "policyCreate", "policyUpdate", "policyDelete", or "policyDetach"?, Unknown type "PolicyCreateInput".
│ 
│   with module.webhooks.spacelift_policy.msteams-integration,
│   on .terraform/modules/webhooks/policy.tf line 1, in resource "spacelift_policy" "msteams-integration":
│    1: resource "spacelift_policy" "msteams-integration" {

Our code:

module "webhooks" {
  source = "spacelift-io/msteams/spacelift"

  channel_name = spacelift_space.dev.id
  space_id     = spacelift_space.dev.id
  webhook_url  = local.webhook_teams_url
}

Workaround: If we pin our provider version to 1.8 we are able to successfully deploy the module. We can then unpin 1.8 and use the latest provider version.

jmfontaine commented 6 months ago

Thanks for the heads-up @jstrese!

We will look into that.

jstrese commented 6 months ago

@jmfontaine Could us being self hosted, using 1.12, have caused this?

See the discussion here:

https://github.com/spacelift-io/terraform-provider-spacelift/issues/542

marcinwyszynski commented 6 months ago

Indeed @jstrese