{"repo":"minamijoyo/tfmigrate","free":true,"listed":false,"github":"https://github.com/minamijoyo/tfmigrate","clone":"git clone https://github.com/minamijoyo/tfmigrate.git","description":"A Terraform / OpenTofu state migration tool for GitOps","language":"Go","stars":1278,"topics":["terraform","tfstate","go","gitops","opentofu"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"tfmigrate A Terraform / OpenTofu state migration tool for GitOps. Table of content Features Why? Requirements Getting Started Install Homebrew Download Source Usage Configurations Environment variables Configuration file tfmigrate block history block storage block storage block (local) storage block (s3) storage block (gcs) Migration file Environment Variables migration block migration block (state) state mv state xmv state rm state import state replace-provider migration block (multi state) multi state mv multi state xmv Integrations License Features - GitOps friendly: Write terraform state mv/rm/import commands in HCL, plan and apply it. - Monorepo style support: Move resources to other tfstates to split and merge easily for refactoring. - Dry run migration: Simulate state operations with a temporary local tfstate and check to see if terraform plan has no changes after the migration without updating remote tfstate. - Migration history: Keep track of which migrations have been applied and apply all unapplied migrations in sequence. You can apply terraform state operations in a declarative way. In short, write the following migration file and save it as state mv.hcl : Then, apply it: It works as you expect, but it's just a text file, so you can commit it to git. Why? If you have been using Terraform in production for a long time, tfstate manipulations are unavoidable for various reasons. As you know, the terraform state command is your friend, but it's error-prone and not sui","default_branch":null,"files":null,"tree":[],"storefront":"/r/minamijoyo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/minamijoyo/tfmigrate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}