Skip to content

Workspace

Valter Silva edited this page Feb 16, 2021 · 1 revision

How-To

Create a workspace and specify a VCS provider and repository:

  1. Get the OAuth Token ID first:
tecli o-auth-token list --organization=foo-org
{
  "ID": "ot-m4nuCHotgiG4JqgZ",
  "UID": "",
  "CreatedAt": "2021-02-01T00:54:48.018Z",
  "HasSSHKey": false,
  "ServiceProviderUser": "valter-silva-au",
  "OAuthClient": {
    "ID": "oc-FvHCcjTK9sZUQA3b",
    "APIURL": "",
    "CallbackURL": "",
    "ConnectPath": "",
    "CreatedAt": "0001-01-01T00:00:00Z",
    "HTTPURL": "",
    "Key": "",
    "RSAPublicKey": "",
    "ServiceProvider": "",
    "ServiceProviderName": "",
    "Organization": null,
    "OAuthTokens": null
  }
},
  1. Create the workspace and specify the OAuth Token ID:
tecli workspace create --vcs-repo-oauth-token-id=<oauth-token-id> --vcs-repo-identifier=<org/repo> --organization=<organization> --name=<workspace>

Replace the placeholders above by the real values. It should look like this:

tecli workspace create --vcs-repo-oauth-token-id=ot-m4nuCHotgiG4JqgZ --vcs-repo-identifier=valter-silva-au/terraform-dummy --organization=foo-org --name=terraform-dummy
{
  "ID": "ws-fo3aNuvd8xVXpX7T",
  "Actions": {
    "is-destroyable": false
  },
  "AgentPoolID": "",
  "AllowDestroyPlan": false,
  "AutoApply": false,
  "CanQueueDestroyPlan": false,
  "CreatedAt": "2021-02-01T01:02:28.137Z",
  "Environment": "default",
  "ExecutionMode": "remote",
  "FileTriggersEnabled": false,
  "Locked": false,
  "MigrationEnvironment": "",
  "Name": "terraform-dummy",
  "Operations": true,
  "Permissions": {
    "can-destroy": true,
    "can-force-unlock": true,
    "can-lock": true,
    "can-queue-apply": true,
    "can-queue-destroy": true,
    "can-queue-run": true,
    "can-read-settings": true,
    "can-unlock": true,
    "can-update": true,
    "can-update-variable": true
  },
  "QueueAllRuns": false,
  "SpeculativeEnabled": true,
  "TerraformVersion": "0.14.5",
  "TriggerPrefixes": [],
  "VCSRepo": {
    "branch": "",
    "display-identifier": "valter-silva-au/terraform-dummy",
    "identifier": "valter-silva-au/terraform-dummy",
    "ingress-submodules": false,
    "oauth-token-id": "ot-m4nuCHotgiG4JqgZ"
  },
  "WorkingDirectory": "",
  "AgentPool": null,
  "CurrentRun": null,
  "Organization": {
    "Name": "foo-org",
    "CollaboratorAuthPolicy": "",
    "CostEstimationEnabled": false,
    "CreatedAt": "0001-01-01T00:00:00Z",
    "Email": "",
    "EnterprisePlan": "",
    "ExternalID": "",
    "OwnersTeamSAMLRoleID": "",
    "Permissions": null,
    "SAMLEnabled": false,
    "SessionRemember": 0,
    "SessionTimeout": 0,
    "TrialExpiresAt": "0001-01-01T00:00:00Z",
    "TwoFactorConformant": false
  },
  "SSHKey": null
}

Clone this wiki locally