terraform-provider-sumologic
terraform-provider-sumologic copied to clipboard
TF Plan fails to handle a Lookup Table that was deleted out-of-band
Steps to Reproduce
- Create a Lookup Table using the Terraform sumologic_lookup_table resource.
- Delete the Lookup Table in the Sumo Logic UI
- 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.
We've experienced this exact issue. Workaround works, but the lookup table should just be created.