create_run
Initiate infrastructure changes using Terraform Cloud by creating a run in a specified workspace. This tool triggers plan and apply operations for deploying, updating, or destroying resources based on workspace settings.
Instructions
Create a run in a workspace
Creates a new Terraform run to trigger infrastructure changes through Terraform Cloud, representing a single execution of plan and apply operations. The run queues in the workspace and executes based on the workspace's execution mode and settings. Use this to deploy new infrastructure, apply configuration changes, or destroy resources.
API endpoint: POST /runs
Args: workspace_id: The workspace ID to execute the run in (format: "ws-xxxxxxxx") params: Optional run configuration with: - message: Description of the run's purpose - is_destroy: Whether to destroy all resources managed by the workspace - auto_apply: Whether to auto-apply after a successful plan - refresh: Whether to refresh Terraform state before planning - refresh_only: Only refresh the state without planning changes - plan_only: Create a speculative plan without applying - allow_empty_apply: Allow applying when there are no changes - target_addrs: List of resource addresses to specifically target - replace_addrs: List of resource addresses to force replacement - variables: Run-specific variables that override workspace variables - terraform_version: Specific Terraform version to use for this run - save_plan: Save the plan for later execution - debugging_mode: Enable extended debug logging
Returns: The created run details with ID, status, configuration information, workspace relationship, and links to associated resources
See: docs/tools/run.md for reference documentation
Input Schema
Name | Required | Description | Default |
---|---|---|---|
params | No | ||
workspace_id | Yes |