opentofu-migration
Skill by BagelHole
Migrates infrastructure-as-code projects from HashiCorp Terraform to the open-source OpenTofu fork. Covers state compatibility, provider registry setup, and CI/CD pipeline updates for teams adopting OpenTofu.
Install opentofu-migration
Built from the published package, never by AI.
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills /tmp/DevOps-Security-Agent-Skills && mkdir -p ~/.claude/skills && cp -r /tmp/DevOps-Security-Agent-Skills/infrastructure/iac/opentofu-migration ~/.claude/skills/opentofu-migrationRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills /tmp/DevOps-Security-Agent-Skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/DevOps-Security-Agent-Skills/infrastructure/iac/opentofu-migration ~/.gemini/antigravity-cli/skills/opentofu-migrationAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The OpenTofu Migration skill guides moving infrastructure-as-code projects from HashiCorp Terraform to the open-source OpenTofu fork. It covers installing the OpenTofu CLI, checking the existing Terraform version, and running a plan against existing state. It also explains how to replace terraform commands with tofu equivalents, regenerate the provider lock file, and configure the provider registry. The skill includes example updates for GitHub Actions and GitLab CI pipelines.
The source states that OpenTofu reads Terraform state files directly, so state backends such as S3 need no migration. It describes OpenTofu-specific features, including native state encryption and early variable evaluation in backend configuration. It also outlines a coexistence approach for running both tools during a gradual migration. The skill is aimed at teams adopting OpenTofu for licensing reasons or evaluating license-free infrastructure-as-code.
Written from the project's SKILL.md and checked against it.
What it can do
- CLI command mappingMaps terraform init, plan, apply, destroy and other commands to tofu equivalents.
- Provider lock file updateRemoves the Terraform lock file and regenerates it for OpenTofu with tofu init -upgrade.
- State backend checkVerifies access to an existing S3 state backend using tofu init and tofu state list.
- Provider registry setupShows a versions.tf example with required providers and version constraints.
- State encryptionDescribes OpenTofu's native state and plan encryption configuration, which Terraform does not have.
- Early variable evaluationShows variables used in backend configuration, which the source says works in OpenTofu only.
- GitHub Actions pipelineProvides a workflow with plan on pull requests and apply on main using setup-opentofu.
- GitLab CI pipelineProvides stages for validate, plan and manual apply using the OpenTofu container image.
- Coexistence strategyDescribes running Terraform and OpenTofu side by side with aliases, direnv or a wrapper script.
- Troubleshooting tableLists common issues such as provider not found, lock conflicts and version constraint errors.
What you need
- Existing Terraform codebase (version 0.13 or later)
- OpenTofu CLI
- State backend access (S3, GCS, Azure Blob, etc.)
- Docker (optional install method)
Try asking
- Help me check whether my Terraform 1.5 project works with OpenTofu.
- Write a GitHub Actions workflow that runs OpenTofu plan on pull requests.
- Show me how to regenerate the provider lock file after moving to OpenTofu.
Good to know
- The source says full compatibility applies to Terraform 1.6.x or lower.
- Some OpenTofu features, such as state encryption, are not available in Terraform.
- The source says OpenTofu uses its own registry but mirrors most Terraform providers.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: infrastructure/iac/opentofu-migration/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to opentofu-migration
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
opentofu-migration: common questions
Do I need to migrate my Terraform state files to use OpenTofu?
The source says OpenTofu reads Terraform state files directly, so no state migration is needed. It advises checking that state access still works after switching.
Why would a team move from Terraform to OpenTofu?
The skill is aimed at teams migrating for licensing reasons or evaluating license-free infrastructure-as-code. OpenTofu is described as the open-source Terraform fork.
Does the skill work with AWS, Azure and GCP providers?
The source uses hashicorp/aws, hashicorp/kubernetes and hashicorp/random provider examples. It states that the same credential environment variables work, including AWS_*, GOOGLE_* and ARM_*.
How do I install opentofu-migration?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is opentofu-migration free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is opentofu-migration safe to use?
It scores 60 of 100. Grades: maintenance D, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to opentofu-migration?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
