create_workspace_variable
Create a new Terraform or environment variable in a workspace. Define variables with categories (terraform/env), optional descriptions, HCL support, and sensitivity flags to secure sensitive data. Use workspace ID, key, and parameters for precise configuration.
Instructions
Create a new variable in a workspace.
Creates a new Terraform or environment variable within a workspace. Variables can be marked as sensitive to hide their values.
API endpoint: POST /workspaces/{workspace_id}/vars
Args: workspace_id: The ID of the workspace (format: "ws-xxxxxxxx") key: The variable name/key category: Variable category ("terraform" or "env")
Returns: The created variable with its configuration and metadata
See: docs/tools/variables.md#create-workspace-variable for reference documentation
Input Schema
Name | Required | Description | Default |
---|---|---|---|
category | Yes | ||
key | Yes | ||
params | No | ||
workspace_id | Yes |