For many years, network and hardware engineers struggled to install and configure servers and other networking devices. In the past decade, following the big surge of the cloud, these activities have been deprecated due to moving to the cloud or virtual servers.
In recent times, it has also become a lot simpler for the software engineer to design, build and power up the required infrastructure. All they have to do is request virtualised components and pay the relevant charges. Infrastructure as Code was born out of this situation. AWS with its IaC tool, called Cloudformation, wanted to meet the huge demand for its services. The ability to treat infrastructure as code and use the same tools e.g. Git, Terminal, IDEs as any other software project would allow developers to rapidly deploy applications.
"Infrastructure as code is the process of managing and provisioning computer data centres through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools." — Wikipedia
The benefits are as follows:
In this article, I will review Terraform and Pulumi, two very popular open-source Infrastructure as Code tools.
Terraform is an open-source tool created by Hashicorp which can help to provision the infrastructure in an easy way. It allows to describe the infrastructure as code, create “execution plans” that outline exactly what will happen when the code is executed, build a graph of the (later) provisioned resources, and automate changes with minimal human interaction. It uses its own domain-specific language (DSL) called Hashicorp Configuration Language (HCL) which is JSON-compatible. One of the biggest advantages compared to AWS’s proprietary IaC tool, called Cloudformation, is that it is cloud-agnostic and it allows automating infrastructure stacks from multiple cloud service providers simultaneously. It also integrates other third-party services. Additionally, custom made Terraform plugins can be written to expand the infrastructure capabilities.
Another open-source tool that has received a lot of traction in the last year is Pulumi, considered by many the biggest competitor to Terraform. Pulumi can be integrated with the existing code and can be used alongside known programming languages such as Node JS, C#, Python, Go. That means, a software developer is very likely to easily understand and use Pulumi, as it is no longer a DevOps or an Operations task.
High Level Comparison
Why another IaC tool? To answer this question, I found the reasoning provided by Pulumi useful. Terraform has revolutionised the IaC world, received amazing traction, supporters and it continues to grow. However, new technologies are providing solutions to the limitations of Terraform, which is mainly the proprietary Hashicorp Configuration Language.
“Other approaches use YAML, JSON, or proprietary domain-specific languages (DSLs) that you need to master and train your team to use. These alternative approaches reinvent familiar concepts like sharing and reuse, don’t tap into existing ecosystems, and are often different for every cloud that you need to target” – Pulumi
Useful references
The Verdict Personally, I have used Terraform a lot. I appreciate and thank Hashicorp for starting the revolution of open source IaC tooling. I admire the efforts to expand and improve their services. On the other hand, although I haven’t used Pulumi professionally, I believe there will be more people adopting this new tool which can be easily integrated and used with the already existing knowledge of JavaScript, C# etc. It seems that the competition will continue and both technologies will respond to one another quickly. For example, Terraform responded with TF CDK. For now, I will continue to use Terraform as I am familiar with it, but I am open to use and learn Pulumi when needed. At the end of the day, both Terraform and Pulumi are tools and tools are used when deemed appropriate to the job. I look forward to seeing where they both go and how people will react to further changes and developments in this field.
Author and Contact DetailsI’m a Senior Consultant at Net Reply within the Future Networks Business Unit. The team consists of consultants, software developers, technology enthusiasts specialising in Telecommunications and technological concepts such as Software Defined Networks (SDN), Network Function Virtualisation (NFV), DevOps. Our mission is to build the Next Generation Networks, leveraging the art of software and latest technological trends. If you would like more information on these, please contact me at Alternatively you can learn more about us on LinkedIn (NetReply) and Twitter (NetReply) or you could just find me on LinkedIn (Stelios Moschos).