Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plan/apply raises 404 on prefect_work_pool if work pool is deleted outside Terraform #260

Open
kevingrismore opened this issue Sep 19, 2024 · 0 comments
Labels
bug Something isn't working development open-source

Comments

@kevingrismore
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform Version

Terraform v1.9.5
on darwin_arm64
+ provider registry.terraform.io/prefecthq/prefect v2.2.2

Affected Resource(s)

  • prefect_work_pool

Terraform Configuration Files

resource "prefect_work_pool" "example" {
  name              = "test-k8s-pool"
  type              = "kubernetes"
  workspace_id      = "<workspace-id>"
  paused            = false
  base_job_template = file("./base-job-template.json")
}

Debug Output

Panic Output

Expected Behavior

After creating a work pool with Terraform, then deleting it through the Prefect UI, Terraform should detect that the work pool doesn't exist & try to recreate it.

Actual Behavior

After creating a work pool with Terraform, then deleting it through the Prefect UI, Terraform raises a 404.

│ Error: Error during get Work Pool
│ 
│   with prefect_work_pool.example,
│   on work_pool.tf line 3, in resource "prefect_work_pool" "example":
│    3: resource "prefect_work_pool" "example" {
│ 
│ Could not get Work Pool, unexpected error: status code 404 Not Found, error={"detail":"Work pool \"test-k8s-pool\" not found."}

Steps to Reproduce

  1. Define a work pool resource
  2. terraform apply
  3. Delete the work pool from the Prefect UI
  4. terraform apply

Important Factoids

References

@kevingrismore kevingrismore added the bug Something isn't working label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working development open-source
Projects
None yet
Development

No branches or pull requests

2 participants