Creating Workspaces
When creating a Workspace, Terrakube supports 3 workflows types and based on the selected workflow you will need to provide some parameters. Please refer to each workflow section for more reference.
Version Control workflow: Store your Terraform configuration in a git repository, and trigger runs based on pull requests and merges.
CLI-driven workflow: Trigger remote Terraform runs from your local command line.
API-driven workflow: A more advanced option. Integrate Terraform into a larger pipeline using the Terrakube API.
Version Control workflow
Click Workspaces in the main menu and then click the New workspace button

Select the IaC type for now we support terraform and open tofu

Choose the Version control workflow

Select an existing version control provider or click Connect to a different VCS to configure a new one. See VCS Providers for more details.

Provide the git repository URL and click the Continue button.

Configure the workspace settings.
Workspace Name
The name of your workspace is unique and used in tools, routing, and UI. Dashes, underscores, and alphanumeric characters are permitted.
VCS branch
A list of branches separated by comma that jobs are allowed to kicked off from VCS webhook. This is not used for CLI workflow.
Terraform Working Directory
Default workspace directory. Use / for the root folder
Terraform Version
The version of Terraform to use for this workspace. Check Custom Terraform CLI Builds if you want to restrict the versions in your Terrakube instance.
Once you fill the settings click the Create Workspace button.

When using a VCS workflow you can select which branches, folder and action (aka, Default template (VCS push)) the runs will be triggered from when a git push action happens.
The VCS branches
accepts a list of branches separated by comma, the first in the list is used as the default for the runs kicked off from UI. The branches are compared as prefixes against the branch included in the payload sent from VCS provider.

You will be redirected to the Workspace page

And if you navigate to the Workspace menu, you will see the workspace in the Workspaces list

Once you create your workspace, Terrakube sets up a webhook with your VCS. This webhook runs a job based on the selected template every time you push new changes to the set workspace branches. However, this feature does not work yet with Azure DevOps VCS provider.
CLI-driven Workflow
Click Workspaces in the main menu and then click the New workspace button

Choose the CLI-driven workflow

Configure the workspace settings.
Workspace Name
The name of your workspace is unique and used in tools, routing, and UI. Dashes, underscores, and alphanumeric characters are permitted.
Terraform Version
The version of Terraform to use for this workspace. Check Custom Terraform CLI Builds if you want to restrict the versions in your Terrakube instance.
Once you fill the settings click the Create Workspace button.

You will be redirected to the Workspace page.

And if you navigate to the Workspace menu you will see the workspace in the Workspaces list

API-driven Workflow
Click Workspaces in the main menu and then click the New workspace button

Choose the API-driven workflow

Configure the workspace settings.
Workspace Name
The name of your workspace is unique and used in tools, routing, and UI. Dashes, underscores, and alphanumeric characters are permitted.
Terraform Version
The version of Terraform to use for this workspace. Check Custom Terraform CLI Builds if you want to restrict the versions in your Terrakube instance.
Once you fill the settings click the Create Workspace button.

ou will be redirected to the Workspace page.

And if you navigate to the Workspace menu you will see the workspace in the Workspaces list

Was this helpful?