terraform-provider-sumologic icon indicating copy to clipboard operation
terraform-provider-sumologic copied to clipboard

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

Open janek-sumo opened this issue 1 year ago • 1 comments

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.

janek-sumo avatar Feb 19 '24 20:02 janek-sumo

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

camilodiazsal avatar Apr 11 '24 00:04 camilodiazsal