---
name: "opentofu-fork-migration"
description: "Run truly open-source Infrastructure as Code using the Linux Foundation OpenTofu engine."
metadata:
  author: "OpenTofu"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "migrate from terraform to opentofu"
  - "enable opentofu state encryption"
  - "run tofu plan"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# OpenTofu Open-Source Infrastructure Engine & Migration

Operates OpenTofu (open-source Terraform fork): migrating existing .tf codebases, managing state encryption at rest (OpenTofu native state encryption), evaluating plans, and provider compatibility.

## When to Invoke
Invoke this skill whenever you need to:
- migrate from terraform to opentofu
- enable opentofu state encryption
- run tofu plan

## Execution SOP & Rules
1. Install tofu CLI binary from official Linux Foundation package repositories.
2. Run tofu init to download provider plugins and verify state lock compatibility.
3. Configure tofu { encryption { key_provider 'aws_kms' {...} } } for end-to-end encrypted state.
4. Execute tofu plan -out=tfplan and verify all provider resources remain intact.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
