What is TerraCognita?

TerraCognita is a key part of Cycloid. We call it our "reverse Terraform" and we're going to show you how it's going to make your move to DevOps easier than you might have previously imagined. 

TL;DR

TerraCognita is open-source software that quickly and automatically creates Terraform from all of your manually-provisioned resources.

Infra as code - best practice

Infrastructure as code, variously known as infra as code and IaC, is code that provides a descriptive model of your cloud infrastructure. The most widely-known infra-as-code tool is Terraform, but it's not the only one - there's also CloudFormation (AWS) and Azure Resource Manager (Azure), as well as several others.

Terraform gets all the love, though, because it's not tied to any one platform, meaning that users don't have to learn a different infra-as-code language for every cloud provider they work with. 

terracognita-screenshot

Why we love IaC

Infra as Code is DevOps - and development - best practice and widely accepted as "a good thing". That's great and all, but how is it actually going to help YOU?

It greatly reduces drift

Manually-configured infrastructures are prone to configuration drift. They're kind of black-boxy - nobody except the person who configured them knows exactly what they're made of and, if things change (and they will change - updates, modifications, etc), they drift even further from their original specifications and become simultaneously harder to handle.

If your model is descriptive, however, as it is in IaC, your Terraform will track the infrastructure in the shape of a state file (.tfstate file), which it will query when it refreshes and reflect in the plan (the difference between how your infra actually works and how you want it to look, as per your Terraform). This means that if your infrastructure starts to drift from the original (or new) requirement, your infra-as-code will forcibly return it to the specified state. 

It facilitates policy application

Having a model of your infrastructure makes it easier to apply policies successfully. When your infrastructure is manual and somewhat mysterious, applying policies is hit and miss. There's no way of knowing if a policy will work or if it's even reasonable in the context of how your infrastructure looks now - it's all just guesswork.

Infrastructure as code, however, means that not only do we know what an infrastructure looks like, but we can be sure that it remains that way over time. You know what you're applying your policies to and how you can expect them to play out and can be much more sure they'll have the desired effect. 

It revolutionizes reproducibility

When one person has configured your infrastructures manually, it’s very hard to reproduce reliably and almost impossible to scale - there's a limit to how much copy-pasting a dev can do, right? When you've generated IaC, however, the problem literally disappears - the Terraform automatically reproduces your environments to specification, whether that's one instance, or 1000.  Even better? You can use your favorite version control system (like Git) to store and work on your IaC files collaboratively.

TerraCognita and Infra Import

TerraCognita is our proud open-source project. While it's great at creating Terraform from manually deployed resources, its big sister Infra Import can also migrate existing environments to IaC and more:

  • Push Terraform Configuration from Terracognita to your Git repository
  • Push a ready to use Stack with a pipeline to execute Terraform jobs 
  • Automatically create a form to modify imported infrastructure parameters
  • Share Imported Infrastructure automation with your teams

So where's the problem?

Terraform isn't hard to write, but if you have a lot of manually-configured resources, it's time-consuming and error-prone. If you don't create Terraform from existing infrastructures, you'll risk the problems we mentioned above, but nobody truly wants to be the person to write that Terraform, even if it is best practice. 

How TerraCognita helps

TerraCognita helps by generating your Terraform files for you, eliminating the time it takes (it's 50% - 70% quicker) and the risk that a human developer will make mistakes when writing it. And it couldn't be easier to use - just give TerraCognita read-only access to your cloud provider and it will take care of the rest.

You might have to slightly edit the final product to make it perfect, but it completely eliminates the copy-pasting that people have used to migrate their infrastructures to IaC in the past, introducing problems all the while. 

Check out the video below to find out more about TerraCognita:

TerraCognita is open-source software

It was important to us to ensure that TerraCognita is open-source. Mainly, this is because open source is an important part of our company's vision. Additionally, we wanted to ensure help for all businesses that want to migrate or automate their infrastructure, because we think it's a clear path to a DevOps mindset, which is also of primary importance. Finally, it's a natural counterpart to InfraView and InfraMap, our cloud diagram creators, part of Cycloid and open-source, respectively.

Terraforming and Terraformer

There are other tools out there that will help you generate Terraform files from existing infrastructure. You might have heard of them when looking for more help on the subject.

Terraforming is a project that hasn't been updated recently. We've been in touch with the creator and he's confirmed that he's no longer focussing on the project. 

Terraformer does a similar job but as far as we know, it isn't being developed as part of a commercial product. TerraCognita and Terraformer were started around the same time, but aren't otherwise related. 

Need more information?

No problem. You'll find more technical details in the documentation.

Contribute to TerraCognita

 



Read More

Infrastructure as code: Cycloid's non-boring guide for the clueless

If you’ve recently moved into the world of DevOps and hybrid cloud, or are thinking of it, you’ll...
May 28 - 4 min read

The Inside Story: Terraform Module Handling

Francesc, a backend developer here at Cycloid and talented maintainer of TerraCognita, tells us...
Mar 25 - 3 min read

Cycloid and the open source community

Today, as part of our birthday series, we're taking a look at Cycloid's relationship with open...
Jul 24 - 4 min read