Terraform
Terraform configuration validation and infrastructure-as-code best practices
Installation
First, install the Han CLI tool:
npm install -g @thebushidocollective/hanThen install the plugin:
han plugin install buki-terraformOverview
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
terraform-configuration
Use when writing and organizing Terraform infrastructure-as-code configurations for cloud resource provisioning.
terraform-modules
Use when creating and using reusable Terraform modules for organizing and sharing infrastructure code.
terraform-state
Use when managing Terraform state files, remote backends, and state locking for infrastructure coordination.
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'