Skip to main content
Alison Aquinas logoAlison's LLM Skills Marketplace

terraform

Included in skill bundleci-cdView on GitHub ↗

Files

SKILL.mdagentsreferences

Install

Install only this skill with npx skills
npx skills add alisonaquinas/llm-ci-dev --skill 'terraform' -g -y
Install the containing skill bundle
/plugin install ci-cd@llm-skills
Download terraform-skill.zip
This skill is bundled inside ci-cd. Use npx skills when you only want this skill, or install the bundle once to make every included skill available through the plugin marketplace flow. Browse the full skill bundle repository at github.com/alisonaquinas/llm-ci-dev.

Invoke

Invoke this skill after installation
/ci-cd:terraform

SKILL.md


name: terraform description: Plan, apply, and manage infrastructure with Terraform. Use when tasks mention terraform commands, HCL configuration, provider setup, state management, or workspace operations.

Terraform

Intent Router

RequestReferenceLoad When
Install tool, first-time setup, tfenvreferences/install-and-setup.mdUser needs to install Terraform or manage versions
Provider config, variables, backendsreferences/configuration.mdUser needs provider blocks, variable files, or backend setup
CLI commands, workflowsreferences/command-cookbook.mdUser needs init/plan/apply/destroy patterns or state commands
State management, remote backendsreferences/state-and-backends.mdUser asks about state files, locking, or remote backends

Quick Start

# 1. Initialize working directory (downloads providers)
terraform init

# 2. Preview changes (always run before apply)
terraform plan

# 3. Apply changes (requires confirmation)
terraform apply

# 4. Destroy infrastructure (DANGEROUS — requires confirmation)
terraform destroy

Core Command Tracks

  • Initialize: terraform init — downloads providers, sets up backend
  • Validate & format: terraform validate, terraform fmt -recursive
  • Preview: terraform plan [-out=tfplan] — no changes made
  • Apply: terraform apply [tfplan] — creates/updates resources
  • Inspect state: terraform state list, terraform state show <resource>
  • Workspaces: terraform workspace list, terraform workspace select <name>

Safety Guardrails

  • Always run terraform plan before terraform apply — review the diff carefully.
  • terraform destroy is irreversible — confirm resource list before proceeding.
  • Never commit terraform.tfstate or .tfvars files containing secrets to version control.
  • Use -target sparingly; it can leave state inconsistent.
  • Enable state locking on remote backends to prevent concurrent modifications.
# Inspect managed resources in state before making changes
terraform state list
terraform state show aws_instance.web

Workflow

  1. Write or edit .tf configuration files.
  2. Run terraform fmt to normalize formatting.
  3. Run terraform validate to catch syntax errors.
  4. Run terraform plan and review the proposed changes.
  5. Run terraform apply only after reviewing the plan.
  6. Commit updated terraform.lock.hcl but never terraform.tfstate.

Related Skills

  • open-tofu — community fork of Terraform; HCL-compatible, tofu binary
  • pulumi — IaC using general-purpose languages (TypeScript, Python, Go, C#)
  • ansible — configuration management and agentless automation
  • ci-architecture — integrating Terraform into CI/CD pipelines
  • aws — AWS CLI for inspecting resources managed by Terraform

References

← Back to marketplace