Terraform State Operations

🌐Community
by lgbarn · vlatest · Repository

Manage Terraform state files securely, automate operations like locking/unlocking, and ensure consistent infrastructure deployments.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add terraform-state-operations npx -- -y @trustedskills/terraform-state-operations
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "terraform-state-operations": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/terraform-state-operations"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill allows AI agents to interact with Terraform state files. It can retrieve, update, and manage infrastructure state information, enabling automated infrastructure management tasks. Specifically, the agent can read existing state data and apply changes based on user instructions or predefined rules.

When to use it

  • Automated Infrastructure Updates: When you need an AI agent to automatically adjust your cloud resources (e.g., scaling up servers) based on current load or configuration.
  • Disaster Recovery Planning: To retrieve and analyze infrastructure state for disaster recovery scenarios, ensuring a consistent environment can be rebuilt.
  • Compliance Auditing: To verify that the actual infrastructure matches the defined Terraform state, aiding in compliance checks.
  • Infrastructure Cost Optimization: Analyze resource usage from the Terraform state to identify potential cost savings opportunities.

Key capabilities

  • Read existing Terraform state data.
  • Update Terraform state based on instructions.
  • Manage infrastructure configuration information.

Example prompts

  • "What is the current instance type of my web server?"
  • "Increase the number of database replicas in the Terraform state."
  • "Show me all resources defined in the current Terraform state."

Tips & gotchas

  • Requires access to the Terraform state file, which may be stored remotely (e.g., AWS S3, Azure Blob Storage). Ensure the AI agent has appropriate credentials and permissions.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
lgbarn
Installs
3

🌐 Community

Passed automated security scans.