Member-only story
Performance Analysis of Infrastructure as Code (IaC) Tools — Part 2— Terraform

Introduction
This blog post comprises the creation of a simple lab test workbench to benchmark the execution of Terraform scripts responsible for the provisioning of a limited set of cloud services.
The lab environment used for this research was built by following the best practices towards having a practical workbench that would allow the benchmark tests to be conducted in consideration of an impartial implementation.
That’s achieved by avoiding noise by external factors like variations in the network bandwidth external to the cloud platform, the use of a single command line interface for both implementation and the definition of the very same cloud services with the very same configurations.
A code sample is included if you want to test it locally. So without further ado, let’s get started!
Pre-requisites
If you’re using Azure Cloud Shell, Terraform is already installed by default. In case you want to execute the commands from your local CLI tool (bash, Windows CMD), you have to install the Azure CLI and Terraform as a first step.
Check the Terraform version:
terraform version
Check the Azure CLI version:
az version
If you’re using a local installation on your own workstation, remember that you also have to be logged in to Azure. Otherwise, if you’re using Azure Cloud Shell you can proceed to the next topic.
az login
Test workbench
A representation of our benchmark workbench is below. Visual Studio Code was used to implement the Terraform scripts. Then Azure Cloud Shell was used to execute the scripts.
