Article
Scalr Organizational Hierarchy - Best Practices
Best practices for using Scalr accounts, environments, and workspaces

The #1 question we get asked is "What are the best practices for using Scalr accounts, environments, and workspaces?"
This picture shows the logical organizational model in Scalr:

Working from the bottom up the recommended use of each "scope" is as follows:
Workspace
- A workspace is used to deploy and manage logical sub-divisions of your infrastructure, such as networking, database, K8 clusters, application instances etc.
- Workspace state can be shared to enable the use of shared infrastructure.
- This is where a Terraform run is performed and a state file (and its history) are stored.
- Variables (Terraform and shell) are assigned values to be passed into a run including provider credentials, possibly set at higher scopes.
For background on the underlying concept, see understanding Terraform and OpenTofu workspaces.
Environment
- A logical collection of workspaces that are typically used by the same team(s), belong to the same application/function and may have common provider credentials, governance policies, and module registry.
- In an environment you can define VCS provider connections and register modules that will be used across the workspaces.
Account
- Manage team and user access to environments with RBAC.
- Define and configure governance policies for all environments.
- Register modules that are shared by all environments.
- Optionally define provider credentials for each environment (published via shell variables).
For patterns that keep access manageable as teams grow, see RBAC at scale. And if you're setting up governance policies for the first time, our guide to enforcing policy as code in Terraform covers the fundamentals.
Frequently asked questions
What should a Scalr workspace be used for?
A workspace deploys and manages a logical sub-division of your infrastructure, such as networking, a database, Kubernetes clusters, or application instances. It's where a Terraform run is performed and where the state file and its history are stored. Workspace state can be shared to support shared infrastructure, and variables assign values passed into runs, including provider credentials.
What is an environment in Scalr?
An environment is a logical collection of workspaces that are typically used by the same teams and belong to the same application or function. Workspaces in an environment can share provider credentials, governance policies, and a module registry, and you can define VCS provider connections and register modules there for use across the workspaces.
What is managed at the Scalr account scope?
The account scope is where you manage team and user access to environments with RBAC, define governance policies that apply to all environments, and register modules shared by all environments. You can also optionally define provider credentials for each environment there, published via shell variables.
About the author

director of platform engineering at Scalr
Ryan Fee is the director of platform engineering at Scalr, with over 15 years of experience improving infrastructure experiences at companies large and small.