Back to all blog posts
Guides

Getting Started with Terramate in existing Terraform and OpenTofu Projects

This blog post demonstrate how we can onboard Terramate in existing Terraform and OpenTofu projects with a single command in just 1 minute.

OpenTofu Terraform Terramate CLI
Sören Martius
Sören Martius
· 2 min read
Getting Started with Terramate in existing Terraform and OpenTofu Projects

Integrating new tools into your existing projects and workflows sometimes feels like a challenge. As developers, we’ve all been there. You come across a promising tool that seems perfect for your needs, but the mere thought of the migration process from your current setup can be daunting enough to make you reconsider the switch.

Because of that, we added a feature to Terramate that allows you to onboard Terramate in existing Terraform and OpenTofu projects with a single command and without touching any of your existing configurations to avoid hard lock-in and breaking changes.

To onboard Terramate in any Terraform or OpenTofu project, all you need to run is the following command at the root of your project:

terramate create --all-terraform

The create --all-terraform command generates a stack.tm.hcl file in each directory that includes Terraform configuration, such as backend or provider blocks, often referred to as root modules.

The stack.tm.hcl files serve as markers for Terramate to identify a directory as a Terramate Stack . They can be used for additional configuration and to instantly leverage Terramate features like orchestration and change detection .

For instance, once you’ve executed the command, using terramate list will give you an overview of all the Terramate stacks detected. The beauty of Terramate is that it won't interfere with your existing Terraform and OpenTofu configuration *.tf files.

This allows you to seamlessly integrate and remove Terramate to and from your Terraform and OpenTofu projects without the need for extensive migration efforts or concerns about being locked in.

Key Takeaways

Easily integrate Terramate into your existing Terraform and OpenTofu projects using the create -all-terraform command, which can be done in less than a minute. This powerful feature lets you enhance your Terraform projects with additional functionalities like orchestration and change detection without modifying your existing configurations.

Suppose you want to learn more about the different capabilities of Terramate and how to leverage those to unify, simplify, and scale all your infrastructure code. In that case, we recommend you look at our introduction or getting started guides.

Community Support

We encourage you to join our Discord community if you have questions or need help with Terramate. We have a supportive community ready to assist you!

Soren is the co-founder and Chief Executive Officer at Terramate. Prior to founding Terramate, he consulted companies such as Flink, 1Komma5 and Nothing to design and implement cloud- and internal developer platforms.