Mastering Terraform Functions

String Functions chomp The chomp function removes any newline character sequence (either \n or \r\n) that appears at the very end of the given string. If the string does not end with a newline sequence, the function returns the string unchanged. Syntax: chomp(string) The string argument is the string you want to remove trailing newlines … Read more

Mastering Expressions In Terraform

Mastering Expressions In Terraform

In today’s blog post, we will discuss expressions in terraform. Terraform supports conditional, for, and splat expressions which help you to add conditional logic (if else conditions), loop through data using for expression, retrieve list items using splat expressions. Conditional Expressions A conditional expression in Terraform allows you to select one of two values based … Read more

Terraform Error Debugging

Terraform Error Debugging

In today’s blog post, we will discuss terraform error debugging. Terraform is an incredibly powerful tool for infrastructure as code, but like any system, you will sometimes encounter errors. Knowing how to avoid common terraform errors and if errors do happen, how to troubleshoot the error is one of the most important skill set required … Read more

Mastering Terraform terraform_data

Mastering Terraform terraform_data

Terraform is built on the principle of declarative infrastructure. You define the desired state, and Terraform figures out how to get there. However, sometimes you encounter situations where you need to introduce imperative logic, force resource recreation based on external changes, or simply have a placeholder for arbitrary data that drives other behaviors. For these … Read more

Mastering Sets In Terraform

Mastering Sets In Terraform

In today’s blog post, we will learn sets in terraform. In particular, how to define a set, how to find union/intersection/difference between two sets, how to check set membership, how to use for expression in sets, and best practices in using sets. So without any further delay, let us get started. Why Set Manipulation is … Read more

Mastering Operators In Terraform

Mastering Operators In Terraform

In today’s blog post, we will learn operators in terraform used to perform calculations, comparisons, or combining conditions to create dynamic configurations. Operators in Terraform allow you to manipulate values, compare them, and build complex logical expressions within your configuration files. Terraform supports a familiar set of arithmetic, equality, comparison, and logical operators, similar to … Read more

Mastering Maps In Terraform

Mastering Maps In Terraform

In today’s blog post, we will learn maps in terraform. In particular, how to define a map, how access a map elements, getting specific map elements, merging two maps data, different terraform functions related to maps, and best practices. So without any further delay, let us get started! What are Maps? In Terraform, a map … Read more

Mastering Lists In Terraform

Mastering Lists In Terraform

In today’s blog post, we will learn working with lists in terraform. In particular, defining lists and tuples, accessing list elements, terraform list functions to get the length of a list, merge two lists into one, remove duplicates, sort and reverse, split a list, compare and find the difference between two lists, checking if an … Read more

Mastering Strings In Terraform

Mastering Strings In Terraform

In today’s blog post, we will learn mastering strings in terraform. In particular, string functions, string concatenation, upper case to lower case conversion and vice versa, subtract and replace sub-string from a string, split and join string, trimming whitespaces, and some tips and best practices on strings in terraform. So without any further due, let … Read more

Mastering Terraform Workspaces

Mastering Terraform Workspaces

In today’s blog post, we will learn terraform workspaces. In particular, how to list, create, switch, show, delete workspaces, how to use workspaces in terraform withe example and workspaces best practices. What Is Terraform Workspaces? A Terraform workspace provides a way to manage multiple distinct instances of a single Terraform configuration within the same working … Read more