terraformAvoid common Terraform mistakes — state corruption, count vs for_each, lifecycle traps, and dependency ordering.
Install via ClawdBot CLI:
clawdbot install ivangdavila/terraformRequires:
terraform state mv, rm, importcount uses index — removing item 0 shifts all indices, forces recreationfor_each uses keys — stable, removing one doesn't affect othersfor_each requires set or map — toset() to convert listprevent_destroy = true — blocks accidental deletion, must be removed to destroycreate_before_destroy = true — new resource created before old destroyed, for zero downtimeignore_changes for external modifications — ignore_changes = [tags] ignores driftreplace_triggered_by to force recreation — when dependency changesaws_instance.foo.id creates automatic dependencydepends_on for hidden dependencies — when reference isn't in configdepends_on accepts list — depends_on = [aws_iam_role.x, aws_iam_policy.y]depends_on if implicit dependency not clear — or plan failssource = "org/name/aws?version=1.2.3"terraform init -upgrade to update — doesn't auto-updatetype = string, list(string), map(object({...}))sensitive = true hides from output — but still in state filevalidation block for constraints — custom error messagenullable = false to reject null — default is nullableterraform destroy is permanent — no undo, use -target carefullymoved block or terraform state mvterraform import aws_instance.foo i-1234 — imports existing resource to stateimport block (TF 1.5+) — declarative import in configGenerated Mar 1, 2026
A team of developers needs to collaborate on Terraform configurations without corrupting state files. This scenario requires implementing remote backends with state locking (e.g., S3 with DynamoDB) to prevent simultaneous runs from overwriting each other's changes. Proper state management practices ensure team productivity and infrastructure reliability.
An organization needs to update production infrastructure without service interruption. Using lifecycle rules like create_before_destroy ensures new resources are provisioned before old ones are destroyed. This approach is critical for maintaining application availability during infrastructure changes.
A company manages development, staging, and production environments with separate configurations. Using separate state files per environment (not workspaces) prevents accidental cross-environment modifications. Proper variable management and module versioning ensure consistency across environments.
An organization needs to import existing cloud resources into Terraform management. Using terraform import commands followed by config creation brings unmanaged resources under version control. This enables future infrastructure changes through code rather than manual console operations.
A team needs to manage resources where instances may be frequently added or removed. Using for_each instead of count provides stable resource identification when removing items, preventing unnecessary recreation of unrelated resources. This is essential for maintaining consistent infrastructure state.
Companies offering cloud infrastructure services can use Terraform to manage resource provisioning for customers. Proper state management and dependency handling ensure reliable service delivery. Revenue comes from subscription fees based on resource usage and management services.
Consulting firms help organizations implement Terraform best practices for infrastructure automation. Services include state management setup, module development, and team training. Revenue is generated through project-based contracts and ongoing support retainers.
Platform providers use Terraform to manage underlying infrastructure for customer applications. Implementing lifecycle rules and proper dependencies ensures platform stability. Revenue models include platform subscription fees and value-added services.
💬 Integration Tip
Ensure Terraform is installed on all team machines and configure remote backends before collaboration. Use version control for Terraform configurations and implement CI/CD pipelines for plan/apply automation.
Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag,...
Essential Docker commands and workflows for container management, image operations, and debugging.
Tool discovery and shell one-liner reference for sysadmin, DevOps, and security tasks. AUTO-CONSULT this skill when the user is: troubleshooting network issues, debugging processes, analyzing logs, working with SSL/TLS, managing DNS, testing HTTP endpoints, auditing security, working with containers, writing shell scripts, or asks 'what tool should I use for X'. Source: github.com/trimstray/the-book-of-secret-knowledge
Deploy applications and manage projects with complete CLI reference. Commands for deployments, projects, domains, environment variables, and live documentation access.
Monitor topics of interest and proactively alert when important developments occur. Use when user wants automated monitoring of specific subjects (e.g., product releases, price changes, news topics, technology updates). Supports scheduled web searches, AI-powered importance scoring, smart alerts vs weekly digests, and memory-aware contextual summaries.