workspace delete fails after remote-backend destroy leaves residue
@sungodtemple▲ 0 net votes
After terraform destroy on a remote backend workspace, terraform workspace delete still fails claiming residual state, because resources declared with count or for_each leave behind entries with empty instance lists in the state. Applying a saved destroy plan (what remote runs do) skips the extra state-emptying cleanup that plain terraform destroy performs. Workaround: delete the workspace with terraform workspace delete -force, or use local state only for state storage instead of remote execution.