Scalr · Schema

Scalr Workspace

A Scalr workspace representing a single Terraform/OpenTofu root module execution context with state, variables, and run configuration

FinOpsGitOpsInfrastructure as CodeKubernetesOPAOpenTofuPolicyTerraform

Properties

Name Type Description
id string Unique identifier of the workspace
name string Workspace name
environment object Parent environment reference
status string Current workspace status
terraform_version string Terraform or OpenTofu version to use
auto_apply boolean Whether to automatically apply plans without manual confirmation
auto_queue_runs string Auto-queuing behavior when workspace is created or configured
execution_mode string How Terraform operations are executed
vcs_provider object VCS integration configuration
tags array Tags for workspace organization and policy targeting
operations boolean Whether remote operations are enabled
cost_estimation_enabled boolean Whether cost estimation runs before apply
has_active_run boolean Whether a run is currently active
current_run object Reference to the current active run
latest_run object Reference to the most recent run
created_at string
updated_at string
View JSON Schema on GitHub

JSON Schema

scalr-workspace-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/scalr/main/json-schema/scalr-workspace-schema.json",
  "title": "Scalr Workspace",
  "description": "A Scalr workspace representing a single Terraform/OpenTofu root module execution context with state, variables, and run configuration",
  "type": "object",
  "required": ["id", "name", "environment"],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier of the workspace",
      "pattern": "^ws-[a-zA-Z0-9]+$"
    },
    "name": {
      "type": "string",
      "description": "Workspace name",
      "maxLength": 255
    },
    "environment": {
      "type": "object",
      "description": "Parent environment reference",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^env-[a-zA-Z0-9]+$"
        }
      }
    },
    "status": {
      "type": "string",
      "enum": ["Active", "Inactive", "Active_Execution"],
      "description": "Current workspace status"
    },
    "terraform_version": {
      "type": "string",
      "description": "Terraform or OpenTofu version to use",
      "examples": ["1.9.0", "1.8.0"]
    },
    "auto_apply": {
      "type": "boolean",
      "description": "Whether to automatically apply plans without manual confirmation"
    },
    "auto_queue_runs": {
      "type": "string",
      "enum": ["skip_first", "always", "never"],
      "description": "Auto-queuing behavior when workspace is created or configured"
    },
    "execution_mode": {
      "type": "string",
      "enum": ["remote", "local", "agent"],
      "description": "How Terraform operations are executed"
    },
    "vcs_provider": {
      "type": "object",
      "description": "VCS integration configuration",
      "properties": {
        "id": {
          "type": "string"
        },
        "repo": {
          "type": "string",
          "description": "Repository path (org/repo)"
        },
        "branch": {
          "type": "string",
          "description": "Default branch to trigger runs from"
        },
        "path": {
          "type": "string",
          "description": "Relative path within repo to the Terraform root module"
        }
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "description": "Tags for workspace organization and policy targeting"
    },
    "operations": {
      "type": "boolean",
      "description": "Whether remote operations are enabled"
    },
    "cost_estimation_enabled": {
      "type": "boolean",
      "description": "Whether cost estimation runs before apply"
    },
    "has_active_run": {
      "type": "boolean",
      "description": "Whether a run is currently active"
    },
    "current_run": {
      "type": "object",
      "description": "Reference to the current active run",
      "properties": {
        "id": {
          "type": "string"
        }
      }
    },
    "latest_run": {
      "type": "object",
      "description": "Reference to the most recent run",
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}