assign_variable_set_to_workspaces
Assign variable sets to specific workspaces in Terraform Cloud, ensuring variables are available and take precedence when priority is enabled. Use the API to link variable sets to workspaces for efficient infrastructure management.
Instructions
Assign a variable set to one or more workspaces.
Makes the variables in a variable set available to the specified workspaces. Variables from variable sets take precedence over workspace variables if the variable set has priority enabled.
API endpoint: POST /varsets/{varset_id}/relationships/workspaces
Args: varset_id: The ID of the variable set (format: "varset-xxxxxxxx") workspace_ids: List of workspace IDs (format: ["ws-xxxxxxxx", ...])
Returns: Empty response with HTTP 204 status code if successful
See: docs/tools/variables.md#assign-variable-set-to-workspaces for reference documentation
Input Schema
Name | Required | Description | Default |
---|---|---|---|
varset_id | Yes | ||
workspace_ids | Yes |