Terraform Cloud Skill for Openclaw

A zero-dependency Python integration for managing Terraform Cloud workspaces, runs, plans, and state via the REST API.

aiwithabidi
v1.0.0
Mar 7, 2026
0
338
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install terraform-cloud

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install terraform-cloud using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Terraform Cloud Skill?

The Terraform Cloud skill provides a robust interface for AI agents to interact with HashiCorp's Terraform Cloud platform. By leveraging this tool within Openclaw Skills, developers can programmatically control their Infrastructure as Code (IaC) environments without leaving their agentic workflow. It covers the entire lifecycle of infrastructure management, from initial workspace provisioning to executing runs and managing state versions.

This implementation is built using Python 3.10+ and relies strictly on the standard library, ensuring a lightweight and secure footprint. It serves as a bridge between high-level AI instructions and the technical REST API calls required to maintain cloud infrastructure at scale.

Terraform Cloud Skill Use Cases

  • Automated provisioning of new Terraform Cloud workspaces for development or staging environments.
  • Programmatic management of infrastructure runs, including triggering applies or discarding plans based on agent logic.
  • Monitoring workspace status and locking environments during critical maintenance windows to prevent concurrent runs.
  • Managing sensitive and non-sensitive variables across multiple workspaces through a unified interface.
  • Retrieving current infrastructure state and plan details for audit or reporting purposes.

How Terraform Cloud Skill Works

  1. The skill authenticates with the Terraform Cloud REST API using the provided TFC_TOKEN and TFC_ORG environment variables.
  2. When a command is issued, the script processes the request and maps it to the corresponding Terraform Cloud API endpoint.
  3. The tool executes the network request using Python's native libraries, ensuring compatibility across various environments within Openclaw Skills.
  4. API responses are received and parsed into a structured format.
  5. The skill returns the result as JSON by default for agent consumption, or as human-readable text when the --human flag is applied.

Terraform Cloud Skill Setup

To integrate this into your Openclaw Skills environment, ensure you have Python 3.10+ installed and configure your credentials:

# Set required environment variables
export TFC_TOKEN="your_terraform_cloud_api_token"
export TFC_ORG="your_organization_name"

# Verify the installation by listing organizations
python3 scripts/terraform-cloud.py orgs

Terraform Cloud Skill Data Schema & Taxonomy

The skill organizes data based on the Terraform Cloud resource hierarchy. All outputs are structured JSON objects containing key metadata:

Resource Key Metadata Fields
Workspaces id, name, auto-apply, terraform-version, description
Runs id, status, is-confirmable, message
Variables id, key, value, sensitive, category
Plans id, status, resource-additions, resource-destructions
Teams id, name, users-count

Terraform Cloud Skill Advanced Features

  • Comprehensive run management including the ability to apply, discard, or cancel active runs via CLI.
  • Granular workspace controls such as locking with specific reasons and unlocking.
  • Support for variable management, allowing agents to dynamically update infrastructure configuration.
  • Dual output modes providing both machine-parseable JSON and human-formatted text for better debugging.
  • Team and organization discovery tools to help agents navigate complex account structures.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Github Stars: 0
forks: 0

Featured*