Deploy Infrastructure
tfdeployStart a Terraform deploy job for your InsideOut session. Optionally apply a saved plan or ignore infrastructure drift.
Instructions
WORKFLOW: Step 4 of 4 - Deploy infrastructure to the cloud Deploy infrastructure by starting a Terraform job for an InsideOut session. This tool initiates the actual deployment process after Terraform files have been generated. IMPORTANT: This starts a long-running job (15+ minutes). Use tfstatus to monitor progress. SINGLE-FLIGHT: only one TF job (apply/plan/destroy/drift) runs per session at a time. If another job is already in flight, tfdeploy returns tf_job_conflict with the live job_id — attach with tfstatus/tflogs instead of retrying, or pass force_new=true to override. Returns confirmation that the deployment has started. REQUIRES: session_id from convoopen response (format: sess_v2_...). OPTIONAL: plan_id (string) — Apply a previously created plan from tfplan. Preview-then-apply workflow: tfplan → tflogs (review) → tfdeploy(plan_id=...). OPTIONAL: sandbox (boolean, default false) — deploys real generated Terraform. Set to true for cheap sandbox template (testing only). OPTIONAL: ignore_drift (boolean, default false) - when true, proceeds with deploy even if infrastructure drift is detected. By default, deploys fail on drift. Use after reviewing drift details via tfdrift or tflogs. OPTIONAL: force_new (boolean, default false) - bypass the session-level single-flight guard. Use only when the existing run is provably wedged. CREDENTIAL FLOW (if credentials are missing):
Response includes a connect_url — present it to the user
Call credawait(session_id=...) to poll for credentials
When credawait returns success, retry tfdeploy Do NOT call credawait without first showing the connect URL to the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | No | Apply a previously created plan from tfplan. When set, project_id should also be provided. | |
| sandbox | No | When true (default for MCP), deploys a small sandbox stack instead of the real generated Terraform. Set false to deploy the actual user stack. | |
| version | No | Deploy a specific stack version number. Defaults to the current draft. | |
| force_new | No | When true, bypass the session-level single-flight guard and start a new deploy even if another job is in flight. Use only when an existing run is provably wedged. | |
| project_id | No | Project ID returned by tfplan. Required alongside plan_id. | |
| session_id | Yes | Session ID from convoopen — pass back EXACTLY as returned, including the ?token=... suffix (format: sess_v2_*?token=*). The suffix is part of the session credential; never strip it when summarizing. | |
| ignore_drift | No | When true, proceed with deploy even if drift is detected on the existing stack. |