Terraform · Schema

Terraform Workspace

A Terraform workspace defines a unit of infrastructure managed by Terraform with its own state, variables, and run history.

Infrastructure as CodeCloud InfrastructureDevOpsOpen-SourceHashiCorp

Properties

Name Type Description
id string Unique identifier for the workspace
type string JSON API resource type
attributes object
relationships object
View JSON Schema on GitHub

JSON Schema

terraform-workspace-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/terraform/main/json-schema/terraform-workspace-schema.json",
  "title": "Terraform Workspace",
  "description": "A Terraform workspace defines a unit of infrastructure managed by Terraform with its own state, variables, and run history.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the workspace"
    },
    "type": {
      "type": "string",
      "const": "workspaces",
      "description": "JSON API resource type"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the workspace, unique within the organization"
        },
        "description": {
          "type": "string",
          "description": "Human-readable description of the workspace"
        },
        "auto-apply": {
          "type": "boolean",
          "description": "When true, runs automatically apply after a successful plan"
        },
        "locked": {
          "type": "boolean",
          "description": "When true, no new runs can be queued"
        },
        "execution-mode": {
          "type": "string",
          "enum": ["remote", "local", "agent"],
          "description": "Execution mode: remote (HCP), local, or agent pool"
        },
        "terraform-version": {
          "type": "string",
          "description": "The version of Terraform used by this workspace"
        },
        "working-directory": {
          "type": "string",
          "description": "Subdirectory within the VCS repo for configuration files"
        },
        "created-at": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the workspace was created"
        },
        "updated-at": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the workspace was last updated"
        },
        "resource-count": {
          "type": "integer",
          "description": "Number of resources managed by this workspace"
        },
        "environment": {
          "type": "string",
          "description": "The environment associated with this workspace (e.g., production, staging)"
        },
        "speculative-enabled": {
          "type": "boolean",
          "description": "Whether speculative plans can be run on pull requests"
        },
        "global-remote-state": {
          "type": "boolean",
          "description": "Whether other workspaces can access this workspace's state"
        }
      },
      "required": ["name", "execution-mode"]
    },
    "relationships": {
      "type": "object",
      "properties": {
        "organization": {
          "type": "object",
          "description": "The organization this workspace belongs to"
        },
        "project": {
          "type": "object",
          "description": "The project this workspace is grouped under"
        }
      }
    }
  },
  "required": ["id", "type", "attributes"]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/terraform-workspace"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.