terraform
CLIInfrastructure as Code tool for provisioning cloud resources.
Declare and provision cloud infrastructure across AWS, GCP, Azure
Recipes
Curated from documentation and usage. Percentages are estimates, not measurements.
Initialize a Terraform project
terraform initPreview infrastructure changes
terraform planApply infrastructure changes
terraform plan -out=tfplan && terraform apply tfplanCommon failures (2)
- resources changed that you did not intendRead the plan output above the apply line; terraform apply -auto-approve skips that review entirely
- Error: credential not foundConfigure cloud provider credentials via env vars or config files
Preview what a destroy would remove
terraform plan -destroyDestroy all resources
terraform destroy -auto-approveCommon failures (1)
- destroyed something you still neededThere is no undo — run terraform plan -destroy first and read the list
Destroy all resources, approving at the prompt
terraform destroyInstall
Homebrew
brew install terraformAgent notes
- When to use
- Provisioning or managing cloud resources with repeatable config
Use from an agent
curl -s https://clihub.com/api/tools/terraform | jq '.agentHints.provenRecipes[] | {task, command, verified}'Or call get_tool with slug terraform on the MCP server at https://clihub.com/mcp.