create_variable_in_variable_set
Add a Terraform or environment variable to a variable set in Terraform Cloud. Specify sensitive values or HCL code. Use API endpoint POST /varsets/{varset_id}/relationships/vars.
Instructions
Create a new variable in a variable set.
Creates a new Terraform or environment variable within a variable set. Variables can be marked as sensitive to hide their values.
API endpoint: POST /varsets/{varset_id}/relationships/vars
Args: varset_id: The ID of the variable set (format: "varset-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-variable-in-variable-set for reference documentation
Input Schema
Name | Required | Description | Default |
---|---|---|---|
category | Yes | ||
key | Yes | ||
params | No | ||
varset_id | Yes |