Terraform cloud block for multiple workspaces

Hi,

I am setting up a github action pipeline to deploy azure infra to multiple environments and regions.

I am using hcp terraform workspaces with tags to achieve multiple configuration using a single main file.

My main.tf has project and tags keywords in workspace section and using github action workflow I select the environment specific workspace at the runtime.

I create workspaces in advance (manually from the terraform portal) and set the tags and variables.

The error I get is while terraform init which says “the currently selected workspace default doesn’t exist”…

Initially I had one single workspace and all was working fine but when I added the second workspace, I got that error which was resolved by using the project keyword in the workspace section in main file.

But now I have created anothet workspace in the same project and the error has reoccurred for all the workspaces…

Anyone in the same boat?