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

open-tofu

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 'open-tofu' -g -y
Install the containing skill bundle
/plugin install ci-cd@llm-skills
Download open-tofu-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:open-tofu

SKILL.md


name: open-tofu description: Plan, apply, and manage infrastructure with OpenTofu (community fork of Terraform). Use when tasks mention tofu commands, OpenTofu configuration, migration from Terraform, or the open-source Terraform alternative.

OpenTofu

Intent Router

RequestReferenceLoad When
Install tool, first-time setup, tofuenvreferences/install-and-setup.mdUser needs to install OpenTofu 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 tofu-specific commands
Migrate from Terraformreferences/migrating-from-terraform.mdUser wants to switch from Terraform to OpenTofu

Quick Start

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

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

# 3. Apply changes (requires confirmation)
tofu apply

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

Key Differences from Terraform

FeatureOpenTofuTerraform
Binarytofuterraform
LicenseMPL 2.0 (open source)BSL 1.1 (source-available)
Registryregistry.opentofu.orgregistry.terraform.io
Native testingtofu test (built-in)terraform test (1.6+)
Encryption at restBuilt-in state encryptionNot available
State compatibilityCompatible with TF state

Core Command Tracks

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

Safety Guardrails

  • Always run tofu plan before tofu apply — review the diff carefully.
  • tofu destroy is irreversible — confirm resource list before proceeding.
  • Never commit terraform.tfstate or .tfvars files containing secrets to version control.
  • Enable state locking on remote backends to prevent concurrent modifications.
  • OpenTofu's built-in state encryption adds an extra layer of protection.
# Inspect managed resources in state before making changes
tofu state list
tofu state show aws_instance.web

Workflow

  1. Write or edit .tf configuration files (HCL is identical to Terraform).
  2. Run tofu fmt to normalize formatting.
  3. Run tofu validate to catch syntax errors.
  4. Run tofu plan and review the proposed changes.
  5. Run tofu apply only after reviewing the plan.
  6. Commit .terraform.lock.hcl (or .opentofu.lock.hcl) but never state files.

Related Skills

  • terraform — HashiCorp's IaC tool; OpenTofu is a compatible fork
  • pulumi — IaC using general-purpose languages (TypeScript, Python, Go, C#)
  • ansible — configuration management and agentless automation
  • ci-architecture — integrating OpenTofu into CI/CD pipelines
  • aws — AWS CLI for inspecting resources managed by OpenTofu

References

← Back to marketplace