Terraform

Why workspaces might not be the best solution for managing states for different environments? like staging and production

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

One reason is that all the workspaces are stored in one location (as in one backend) and usually you don't want to use the same access control and authentication for both staging and production for obvious reasons. Also working in workspaces is quite prone to human errors as you might accidentally think you are in one workspace, while you are working a completely different one.