spacelift-io / terraform-provider-spacelift

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

Cannot refresh worker pool #567

Open joe-hutchinson-cko opened 2 months ago

joe-hutchinson-cko commented 2 months ago

Using provider version 1.15 it appears as if the provider can't handle workerpool recreation properly and reports success when infact it did a noop.

To reproduce:

  1. Create a worker pool
  2. Create a stack that uses that worker pool
  3. Test the stack can do work such as execute a TF plan
  4. Set an invalid workerpool token for the worker to use
  5. Restart worker
  6. Confirm the worker cannot connect to worker pool
  7. Taint the worker pool
  8. TF apply to fix the taint
  9. Check if the worker can do work (I expect this to fail)

The provider will report it has recreated the worker pool which is odd given the UI states workerpools cannot be destroyed when referenced by a stack.

What I'd expect to happen when you taint a resource is the recreation is actually the provider doing a refresh of the workerpool.