SumoLogic / terraform-provider-sumologic

Terraform provider for Sumo Logic
https://www.terraform.io/docs/providers/sumologic/
Mozilla Public License 2.0
36 stars 52 forks source link

TF Plan fails to handle a Lookup Table that was deleted out-of-band #622

Open janek-sumo opened 4 months ago

janek-sumo commented 4 months ago

Steps to Reproduce

  1. Create a Lookup Table using the Terraform sumologic_lookup_table resource.
  2. Delete the Lookup Table in the Sumo Logic UI
  3. Run a Terraform plan for that resource

Observed

Error: {"id":"8<obfuscated>0","errors":[{"code":"lookup:invalid_request","message":"Invalid lookup table request.","detail":"Either the path does not exist or you don't have the right permissions"}]}

Expected

In declarative infrastructure if the resource is defined, but does not exist, then it should be created. I expected Terraform to recreate the missing Lookup Table after it was deleted manually.

Workaround

I had to perform manual Terraform surgery and remove the resource from the Terraform State before a subsequent Plan succeeded.

camilodiazsal commented 2 months ago

We've experienced this exact issue. Workaround works, but the lookup table should just be created.