How STRUCTURA.IO makes developing Terraform easier
10 November 2022
10 November 2022
As the world has gravitated to Infrastructure as Code (IaC), the industry has adopted HashiCorp’s Terraform more than any other tool. Seeing the value of IaC and the massive need for help with its adaptation, STRUCTURA.IO was born. Whether you are brand new to working with Terraform, have a ton of knowledge and experience, or are somewhere in between – STRUCTURA.IO is a tool that can enable you and your team to develop Terraform code more effectively and efficiently.
The user interface and IDE
The first thing to understand about STRUCTURA.IO is that the drag and drop interface automatically writes the code in real time. When interacting with the configuration fields (think of typing a string of characters in a text box or toggling a true/false switch), the Terraform code is generated simultaneously, side by side. This not only enables STRUCTURA.IO users to create or edit Terraform code with zero experience, it also allows them to become familiarized with how HCL (HashiCorp Configuration Language) code is written from scratch.
Terraform code visualized
While this user interface can make Terraform development easier for everyone in many use-cases, there are experienced Terraform developers who prefer to write the code or at least some parts of it themselves. STRUCTURA.IO is designed with this in mind, which why it has the ability to write the code in an IDE text editor with the same features developers are used to (syntax highlighting, IntelliSense, search, undo/redo, etc.). This ensures users are able to switch between either option and can still benefit from all the other features STRUCTURA.IO has to offer.
One of the most iconic and notable distinctions of STRUCTURA.IO is the visualized, graphic view of Terraform code. In traditional code editors, when you open a Terraform project all you see is its various code blocks. You do not gain any immediate understanding of how these blocks of code are each related, especially as a whole. It takes a lot of searching around and can take a lot of time to understand the ins and outs of a Terraform project or module. This is one area where STRUCTURA.IO shines. As soon as you open a Terraform module in STRUCTURA.IO, you gain immediate insight into the inner workings of the code. Having the code plotted graphically enables the user to see which blocks of code are related to one another, which not only deepens and speeds up understanding of the code, but is also provides better visibility of where a relationship might be missing or misconfigured.
Advanced syntaxes simplified
As previously mentioned, the user interface of STRUCTURA.IO enables the user to configure and generate HCL code. Anyone versed in HCL code knows that there are some unique and advanced syntaxes in the language, such as “For Expressions” (for-loops) among others. STRUCTURA.IO not only understands these advanced syntaxes and every variation they have, but it makes them easier to work with too. With its user interface, STRUCTURA.IO provides the advantages of breaking the advances syntaxes down into pieces, with each piece having a name and a description, helping the user to build out the advanced syntax in a simple manner. On top of this, STRUCTURA.IO automatically shows the user what the output of syntaxes will generate at run time, for instance For Expressions will generate a list or map of values at run time and STRUCTURA.IO will calculate that list or map output and the elements that will be inside, which can greatly speed up working with the syntax.
Built in Terraform provider documentation
As Terraform has thousands of providers, and providers often have hundreds of resources, provider documentation for each resource can be very important sometimes for understanding how to use the resources. Navigating the documentation and finding the correct provider, provider version, and resource takes more time than it needs to. STRUCTURA.IO automatically fetches the correct provider documentation for every resource that has documentation, saving valuable time and improving the flow.
Enhanced Terraform function workflow
Terraform also provides a number of built-in functions that can be used throughout the configurations to calculate, transform and combine values. Similar to the provider documentation, information on these functions are all documented online. However, code editors do not currently list these out at all, nor do they give descriptions, or any suggestions for how to work with them. STRUCTURA.IO is different, it lists out every single function and is a drag and drop away from being added to the configuration. Each function has an easily accessible description so the user knows what it does. The user interface for the function gets broken down into pieces, ensuring each input argument for the function is placed in the correct order, and each input argument also has a description for even more clarity. On top of those benefits, similarly to the “For Expressions” mentioned earlier, STRUCTURA.IO automatically outputs the run time result of these functions in real time, which can speed up the development greatly by removing the need to test these functions manually, and also help avoid unexpected outputs.
Generate Terraform code from existing infrastructure
One problem the industry has been facing is some difficulty in switching over to Terraform. STRUCTURA.IO solves some of those challenges in the ways listed above. However, another reason switching to Terraform can be difficult is that companies may have a large number of infrastructure resources already created in the cloud for example, without the help of Terraform. Importing these resources into Terraform for Terraform to manage is the solution however it requires a lot to manual work to generate the Terraform configuration blocks for each of these resources. STRUCTURA.IO is able to remove a majority of man power and experience required to do so with its ability to select the existing infrastructure resources you have, import them and automatically generate the Terraform resource block for each one. A developer will still be required to review the code and Terraform plan that will be generated, however it reduces a lot of the grunt work. This feature is supported for over twenty of the most popular Terraform providers and each of their most important resources.
Security suggestions and cost estimations
Now for the cherries on top. Any platform that makes working Terraform easier could not be complete without code analysis and suggestions. STRUCTURA.IO has tooling to scan the Terraform code for security vulnerabilities as well as best practices that are not being followed. It pinpoints exactly which resources are in violation and the recommended actions to be in compliance. The resource link conveniently opens the correct resource configurations so that the recommended changes can be made. Additionally, STRUCTURA.IO provides up-to-date cost estimates for the infrastructure. It is integrated with the supported provider’s cost APIs, allowing the true current cost of given infrastructure at its current configured settings.
This is not an exhaustive list of features of STRUCTURA.IO, but just some of the features that make working with Terraform easier, and the array of such features available with STRUCTURA.IO continues to grow. Find out more through our website and various resources, and schedule a demo to learn even more!