terraform-cloud-mcp

by severity1
Verified

lock_workspace

Prevent runs from being queued in a Terraform Cloud workspace by locking it. Use this tool during maintenance or manual adjustments to halt infrastructure changes while allowing ongoing plans or applies to complete.

Instructions

Lock a workspace.

Locks a workspace to prevent runs from being queued. This is useful when you want to prevent changes to infrastructure while performing maintenance or making manual adjustments. Locking a workspace does not affect currently running plans or applies. API endpoint: POST /workspaces/{workspace_id}/actions/lock Args: workspace_id: The ID of the workspace to lock (format: "ws-xxxxxxxx") reason: Optional reason for locking Returns: The workspace with updated lock status and related metadata See: docs/tools/workspace_tools.md for usage examples

Input Schema

NameRequiredDescriptionDefault
reasonNo
workspace_idYes

Input Schema (JSON Schema)

{ "properties": { "reason": { "default": "", "title": "Reason", "type": "string" }, "workspace_id": { "title": "Workspace Id", "type": "string" } }, "required": [ "workspace_id" ], "title": "lock_workspaceArguments", "type": "object" }
ID: iukijjkm1e