Gabe Levasseur
Gabe Levasseur
Terraform workspaces is essentially equivalent to your use of environment but built into terraform. We use the same terraform files but checkout workspace prod or staging before running terraform apply...
AFAIK the only way to switch workspaces is by running `terraform workspace select prod`, for example. You only need to run init once and after that you can switch workspaces...
We particularly like to lock master so we can take advantage of codeowners and number of reviewers required before being able to merge.