Terraform
DevOps
terraform-state-split
utilities

Introducing 'terraform-state-split': A New Tool for Reorganizing Terraform States

Jul 03, 2023 by: Tarek Elsamni

As many Terraform users know, managing and organizing resources across different states can be a complex task. The conventional methods often require substantial manual effort and technical expertise. Today, I'm thrilled to share a tool that I've developed to simplify this process - the 'terraform-state-split' CLI.

The 'terraform-state-split' CLI is an intuitive, interactive tool designed to facilitate the transition of Terraform resources between different states. This tool not only helps to reduce the size of your Terraform states, but it also enables you to divide your resources into multiple state files or reorganize your Terraform states as per your requirements.

A Real-life Success Story: From 1400 Resources to Manageable Chunks

The real power of 'terraform-state-split' is highlighted through its practical application. I had been grappling with a giant Terraform state that comprised over 1400 resources. Such a massive state was cumbersome to manage, created complexities during updates or modifications and consumed so much time during running plans to do minor changes.

With 'terraform-state-split', I was able to break down this monolithic Terraform state into multiple smaller, more manageable states. This didn't just improve the organization of the resources, but it also made modifications and updates considerably more straightforward and less error-prone. The tool has truly transformed the way I work with Terraform.

DEMO

asciicast
Terraform state split demo

Here’s How You Can Get Started

Ready to give 'terraform-state-split' a try? Here's how you can get it installed:

First, tap into the shebang-labs tap via Homebrew with the following command:

brew tap shebang-labs/tap

Next, install the 'terraform-state-split' CLI:

brew install terraform-state-split

And that's it! You are all set to start leveraging the power of 'terraform-state-split' CLI to better manage and reorganize your Terraform states.

The source code for this CLI is publicly accessible.

You can find it at: https://github.com/shebang-labs/terraform-state-split.

I encourage you to explore it, play around with it, and provide your valuable feedback.

In conclusion, 'terraform-state-split' is a tool developed out of necessity, and it embodies the essence of "making things easier." So, whether you're looking to reduce your Terraform states, divide them into multiple state files, or simply reorganize them, give 'terraform-state-split' a try and see the difference for yourself.

share this article:
Interested in our services?
Let’s Talk
Sepapaja tn 6, 15551 Tallinn, Estonia
hello@shebanglabs.io
+372 602 7088
Proudly made in Estonia

© 2024 Shebang Labs All rights reserved.