Workspaces¶
Workspace is the place from where we create our infrastructure resources. All resources which get deployed are a part of some workspace. Workspaces can be used to group together certain set of resource which correspond to each other. For e.g., if we have multi-cloud infrastructure then we will have two different set of terraform files which will create the required resources in each cloud provider. To manage resources in these two cloud-providers we can chose to deploy them in two different workspaces. Workspace brings logical differentiation in our entire infrastructure. A workspace will be always be part of an organization.
Below we discuss how we can create a terraform workspace
Creating a terraform workspace¶
- Select your organization from the Organization's page.
- Click on + New Workspaces to create a new workspace.
- Select the first workflow Version Control workflow to begin with.
- Select GitHub or chose your own VCS provider.
- We are right now chosing our repo
terraform
for this. To attach your own repo (not required to carry on this tutorial) see Connecting VCS. - Configuring the setting of the workspace.
- Give a name to the workspace. Naming a workspace, not necessarily, should be of some convention. We use
<ENV_TYPE>-<LOGICAL-DIFFERENCE>
for workspace nomenclature. As we are deploying infrastructure (hardware infra) and our environment type is fordevelopment
so our workspace name ifdev-infra
. - In advance options we select the path and branch where the terraform code for our workspace is present. Here we are using
/infra
as the path andmaster
as the branch.
- Give a name to the workspace. Naming a workspace, not necessarily, should be of some convention. We use
- Click on Create Workspace to create the workspace.