Skip to content

Latest commit

 

History

History
132 lines (77 loc) · 9.17 KB

creating-workspaces.md

File metadata and controls

132 lines (77 loc) · 9.17 KB

Creating Workspaces

{% hint style="info" %} Manage Workspaces permission is required to perform this action, please check team-management.md for more info. {% endhint %}

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

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.

{% hint style="info" %} If you want to connect to a private git repo using SSH Keys you will need to provide the url in ssh format. Example [email protected]:jcanizalez/terraform-sample-repository.git. For more information see ssh.md {% endhint %}

Configure the workspace settings.

Field Description
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.md 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.

Field Description
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.md 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.

{% hint style="info" %} The overview page for CLI-driven workspaces show the step to connect to the workspace using the Terraform CLI. For more details see cli-driven-workflow.md {% endhint %}

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.

Field Description
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.md 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.

{% hint style="info" %} For more details how to use the Terrakube API. See api-driven-workflow.md {% endhint %}

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