spotlight_workspace

The spotlight_workspace resource, and the workspace resource of the API: the top-level account, which holds teams, members and their roles, the GitHub connection, secrets, runners and workspace tokens.

KindEndpointTerraformAddress
workspace/api/resources/workspacesspotlight_workspace<slug>

See Resource API for the operations, headers and errors every kind shares.

Example

import {
  to = spotlight_workspace.acme
  id = "acme"
}

resource "spotlight_workspace" "acme" {
  name = "Acme"
  slug = "acme"
}

Fields

FieldTypeDefaultDescription
namestringrequiredWhat the workspace is called. 1 to 100 characters.
slugstringrequiredThe workspace's address in URLs, as in /w/acme. Lowercase letters and digits, with single dashes between them, at most 48 characters, written exactly as it is kept. Fixed: an update that changes it is refused; Terraform replaces the resource.

Rules

OperationRule
createNeeds open-workspaces: any signed-in person, never a workspace token. The creator becomes the workspace's owner.
updateNeeds configure. Changes name only.
deleteNeeds administer. Refused with 409 in-use while the workspace holds any team, workspace token, workspace token trust, secret, runner pool, runner trust or workspace runners. Deleting closes the workspace.
listEvery workspace the caller may read. A workspace token reads only its own.
importGET /api/resources/workspaces/import?address=<slug>

An in-use refusal names what is left, as in Workspace acme is not empty. Still holds: team core. A closed workspace grants nothing to anyone. See Roles and permissions for who holds each permission.

In Terraform

  • spotlight_workspace cannot be created by Terraform. The create is refused with 403, and the provider says to import the workspace by its slug. Destroying it deletes the workspace, under the rules above.
  • The data source spotlight_workspace reads a workspace without managing it. See Provider.

A workspace created in the web app

The web app's form asks for a workspace name, a workspace URL (the slug) and a team name. It creates, in one step:

  • the workspace, with the person as its owner;
  • its first team, with the given name and a key made from it: lowercased, each run of other characters turned into one dash, cut to 64 characters, with no dash at either end;
  • the Delivery and Review lines on that team, as listed in Built-in lines;
  • a task titled Set up your team at Delivery's backlog, assigned to the owner.

A workspace created through the resource API has no team. See spotlight_team for teams.

On this page