Corrupted Default Workspace

This is Terraform for VSCode on Windows 10.

'Network Interface (“name-int”) (resource group “name”) was not found!"

I had this issue months ago and solved it; My default workspace was corrupted; It was looking for elements that weren’t there, and wasn’t trying to create them as it should.

I can make a new work space and operate easily, but it only works for one apply. I have to keep making workspaces.

What can I do to make sure my workspaces aren’t corrupt upon opening?

Terraform use statefile to store the status of resources of the last successful apply.

If a resoruce has been removed outside of terraform, terraform won’t know until you do a terraform plan/apply/refresh.

so the question is, is it really corrupt or simply changed outside of your terraform code? when not sure, think if there is anyone in your ornisation that share the same credential as you…