Blog Series (11) - Terraform
Back in 2021, I dedicated sometime to write series of posts around Terraform. If you follow this series, my hope for you is to be directed in the right direction of becoming an expert.
Terraform topics are divided into 11 different posts - these cover the essential learning required.
Introduction to Terraform
Talking about Digital Transformations that organizations go through, the cloud has proved to be of immense importance and often stands at the epicenter of their transformation journey. Over the years and decades, it has become very evident that cloud platforms not only help reduce time and cost but rather - let the customers focus on their core business.
Terraform Syntax - Part 1
This post is intended to give a brief overview of the configuration syntax of Terraform. We would go through an example and touch up on some of the important aspects of Terraform configuration language, to successfully create an IaC and see that in action.
Terraform Syntax - Part 2
In part 2, we would cover some basics of meta-arguments, expressions, and functions.
Terraform CLI - Part 1
In all the examples till now we have used this workflow from CLI. It is safe to say we have used a CLI-based workflow. In this post, we take a moment to understand the significance of Terraform CLI.
Version control is not enough when it comes to infrastructure code development and management. In order to manage the infrastructure, Terraform needs to know how many real-world infrastructure assets exist. It needs to maintain a mapping of these real-world objects so that future operations can be carried out successfully.
Terraform CLI - Part 2
Now that we have a basic understanding of how Terraform states work, let us take a look at some of the Terraform CLI commands which come in handy to work with the same. We shall also take a look at the significance of these commands and why one should be familiar with them.
Modules are a way to organize Terraform code into re-usable chunks of IaC. Managing code for the complex infrastructure stack in a single go is not a good idea. This is for obvious reasons, the maintenance of the infrastructure itself may become a headache trying to figure out what caused what in lots of lines of IaC.
Terraform Data Sources
Data Sources in Terraform is one of the important concepts which enables you to work with data values sourced from somewhere else. Somewhere else here would mean other modules, cloud providers, or even locally.
In this post, we discuss backends that can be used with Terraform. Working with backends is essential when a larger team works on developing Terraform code. This is mainly because Terraform relies heavily on states for its operations and there is a huge scope of states getting “corrupted” if we “just use Github” to maintain the same.
Terraform helps us run some initial provisioning steps, where it helps us perform certain initial command line activities as soon as the new system boots. Having said that - it should be mentioned that Terraform is not a provisioning tool. There are other tools that are dedicated to work for such configuration management.
Introducing Terraform into the team can be a bit difficult. It is not just a matter of introducing a new language of infrastructure development, but also involves adopting new processes and authorization models to manage remote executions and states. Like DevOps, this transition also demands the change in mindset of the team.