Do we call them "workspaces" or "folders"?

I have never been clear on the right terminology for this.

I have a single repo with a bunch of folders each folder points to its own state of course.

each folder is also technically a workspace because there is always the default workspace right?

so even though I only use the default workspace and never create or switch to other ones I have still been calling these folders workspaces.

Is that wrong? I know I’m sort of splitting hairs but what should I be calling them that best describes the way I use them?

The Terraform documentation typically describes the object you’re referring to as a “configuration”, which is defined as a particular root module and all of the descendent modules it calls taken together.

As you said, each configuration must have at least one workspace called default, and so it does seem reasonable to call them “workspaces” if you like, but there is a risk that someone else might understand that as refering to multiple namespaces associated with a single configuration, and so for that reason I typically don’t use that terminology when describing the architecture you’re talking about.

If you are using Terraform Cloud then it’s UI makes the single workspace associated with a configuration more prominent, because it’s then the main concept you interact with in the UI. In that case in particular I could see it as being pretty reasonable to refer to your directories as “workspaces”, if indeed each of the configurations is associated with a separate Terraform Cloud workspace.

1 Like