sickn33/agentic-awesome-skills/opentofu-migration
Claude Code and agent skill by sickn33/agentic-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
Migrate from Terraform to OpenTofu with state compatibility, provider
Install
npx vskill@latest install sickn33/agentic-awesome-skills/opentofu-migrationSKILL.md
OpenTofu Migration
Migrate infrastructure-as-code from HashiCorp Terraform to the open-source OpenTofu fork.
When to Use This Skill
Use this skill when:
- Migrating from Terraform to OpenTofu for licensing reasons
- Setting up a new IaC project and evaluating OpenTofu vs Terraform
- Updating CI/CD pipelines to use OpenTofu
- Configuring the OpenTofu provider registry
Prerequisites
- Existing Terraform codebase (0.13+)
- OpenTofu CLI installed
- State backend access (S3, GCS, Azure Blob, etc.)
Install OpenTofu
Migration Checklist
1. Verify Compatibility
2. Replace CLI Commands
| Terraform | OpenTofu | |
|---|---|---|
terraform init | tofu init | |
terraform plan | tofu plan | |
terraform apply | tofu apply | |
terraform destroy | tofu destroy | |
terraform fmt | tofu fmt | |
terraform validate | tofu validate | |
terraform state | tofu state | |
terraform import | tofu import |
3. Update Provider Lock File
4. Update State Backend
State files are compatible — no migration needed. Just verify:
5. Provider Registry
OpenTofu uses its own registry but mirrors most Terraform providers:
OpenTofu-Specific Features
State Encryption (Not in Terraform)
Early Variable/Local Evaluation
CI/CD Pipeline Updates
GitHub Actions
GitLab CI
Coexistence Strategy
If you need both tools during migration:
Troubleshooting
| Issue | Solution | |
|---|---|---|
| Provider not found | Inspect the existing lock/source and registry availability before any separately reviewed upgrade | |
| State lock conflict | Same as Terraform — check DynamoDB/blob lease | |
| Version constraint error | Choose a tested version constraint compatible with the actual configuration | |
| Backend migration | State is compatible — just run tofu init | |
| Missing provider credentials | Same env vars work (AWS_*, GOOGLE_*, ARM_*) |
Related Skills
- terraform-aws (
terraform-aws) — AWS IaC patterns (works with both) - terraform-azure (
terraform-azure) — Azure IaC patterns - terraform-gcp (
terraform-gcp) — GCP IaC patterns - policy-as-code (
policy-as-code) — OPA policy checks for IaC
Limitations
- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
- Docs-only import: upstream scripts and templates not bundled.
Before migration, back up configuration and state using the backend’s protected procedures; prohibit concurrent Terraform/OpenTofu writers. First compare no-change plans with unchanged provider versions. CI plan/apply fragments are incomplete without secure artifact upload/download, revision/hash binding, protected approval and an apply role unavailable to untrusted PR code; do not silently re-plan during apply. Plan/state files can contain secrets and must not be posted publicly. See OpenTofu migration guide.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/opentofu-migration/SKILL.md
Popularity
- Repository stars
- 48,623
- Repository forks
- 7,062
- 7-day trend score
- 54
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/agentic-awesome-skills/opentofu-migration)