Blogs

Why my teacher would have made us rewrite this

Infrastructure as code at Fluxygen

When I got to my first programming lesson in Java our teacher taught us the basic principles of software engineering. He explained the variable types, operators, booleans, loop variants and so on. He also taught us what we absolutely should not do, things he considered bad-practice. If we did any of these things we would get an instant ‘F’ for our exam.

One of these bad-practices was duplicating code, copy-paste, etc. When you are new to programming it is really tempting to just copy-paste. Want to repeat something? Just copy-paste, easy right? Well, until you are copy-pasting the same piece over and over again and discover a bug, what then? You need to solve that bug in every piece you just pasted everywhere in your code, what if you forget such a pasted piece?

At Fluxygen we had a ‘copy-paste issue’ with our Infrastructure-as-code (IaC). To build our infrastructure in AWS we use Terraform. Terraform is a software application that has its own programming language called HCL. The benefit of that is that you only need to learn HCL with the ability to apply it to many things, in our case AWS.

So what happened? Well if you only have to manage a single AWS environment you only have to manage a single Terraform configuration. Second environment? Just copy-paste, we will deal with this duplicated code later. Third environment? Copy-paste. Fourth environment? You get where I’m heading, an F for the exam.

Each environment was a copy of another environment

So how did we solve this? We removed a lot of duplicated Terraform configurations with each containing over 500 lines of code. We were able to achieve a reduction of 73% in the total number of lines of code!

This new configuration gives us the ability to maintain all Fluxygen environments in AWS with only a single Terraform configuration. The only difference between customers are the parameters. From now on, if we find a bug, or want to optimise something we only need to change it once, instead of multiple times.

One configuration to rule them all

One configuration to rule them all

So how does this benefit you as a customer or partner? Firstly we are able to deploy faster and more reliable infrastructure to the cloud. And secondly, the improvements we make for one customer can be applied to others as well, everybody benefits. Last but not least, we can spend more time on infrastructure innovation.

Fluxygen iPaaS

Fluxygen iPaaS

An iPaaS is an excellent way to support your application integration. iPaaS is short for integration Platform as a Service. Fluxygen is such a Platform.

The Fluxygen application is a no code integration tool that can connect almost anything.

Related resources

Fluxygen 4.17.13

Fluxygen release 4.17.13 focuses on security, s...

Application Integration is more than an API Connection

An API connection alone does not make a success...

Secure Your Integrations with Fluxygen Hardening

Fluxygen hardening adds an extra security layer...

Episode 6: Handling Errors Smartly – Integrating TMS with a Visibility Platform

In the final episode of Integrating with Fluxyg...

This website uses cookies

We use cookies to personalize content, provide social media features, and analyze our traffic. We also share information about your use of our site with our analytics partners. You can change your preferences at any time. For more information, please see our Privacy Policy and Cookie Policy.