⚔

Terraform

Terraform configuration validation and infrastructure-as-code best practices

Installation

First, install the Han CLI tool:

npm install -g @thebushidocollective/han

Then install the plugin:

han plugin install buki-terraform

Overview

Terraform configuration validation and infrastructure-as-code best practices.

Features

  • Validates Terraform configuration formatting with terraform fmt
  • Validates Terraform syntax and configuration with terraform validate
  • Provides skills for working with Terraform configurations, state, and modules

Requirements

Install Terraform:

# macOS
brew install terraform

# Linux
wget https://releases.hashicorp.com/terraform/1.6.0/terraform_1.6.0_linux_amd64.zip
unzip terraform_1.6.0_linux_amd64.zip
sudo mv terraform /usr/local/bin/

Skills Included

  • terraform-configuration: Writing and organizing Terraform configurations
  • terraform-state: Managing Terraform state files
  • terraform-modules: Creating reusable Terraform modules

Hook Behavior

Validates Terraform configurations in directories containing .tf files using terraform fmt and terraform validate.

Skills

Hooks

🪝

Stop

Runs when the main Claude Code agent has finished responding.

npx -y @thebushidocollective/han hook run --fail-fast --dirs-with *.tf -- sh -c 'terraform fmt -check && terraform validate'
🪝

SubagentStop

Runs when a Claude Code subagent (Task tool call) has finished responding.

npx -y @thebushidocollective/han hook run --fail-fast --dirs-with *.tf -- sh -c 'terraform fmt -check && terraform validate'