Mastering Terraform Local Variables

Mastering Terraform Local Variables

In today’s blog post, we will learn terraform local variables better known as local values. While input variables are the standard way to define variables in terraform, you can use local variable to temporarily perform some data manipulation and store the outcome. This detailed guide will walk you through everything you need to know about … Read more

Mastering Terraform Variables

Mastering Terraform Variables

In today’s blog post, we will discuss terraform variables, specifically variable syntax, data type, declaration, assignment, and validation. A variable is used to pass inputs to a terraform module, resource, data source or in any other configuration and store values. A variable enables you to keep your terraform code reusable. What are Terraform Variables? In … Read more

Mastering Terraform Block

Mastering Terraform Block

In today’s blog post, we will learn terraform block used to define some critical terraform configurations like backends, terraform and provider versions etc. When you open a Terraform configuration file (.tf), one of the first and most fundamental blocks you will encounter is often the terraform block. While it does not directly define your infrastructure … Read more

Mastering Terraform Import Block

Mastering Terraform Import Block

In today’s blog post, we will discuss terraform import block used to import a configuration into the state file. Normally, terraform records the configuration of all the infrastructure managed by it in the state file. Now what if the infrastructure configuration was changed outside terraform. Terraform state file will not have those outside terraform changes … Read more

Mastering Terraform Backend Block

Mastering Terraform Backend Block

In today’s blog post, we will learn terraform backend block, used to configure terraform state file storage and locking configurations. Nested within the terraform block, the backend block is an important configuration for how Terraform manages its state file (terraform.tfstate). This detailed guide will walk you through the terraform backend block, covering its fundamental purpose, … Read more

Mastering Terraform Dynamic Block

Mastering Terraform Dynamic Block

In today’s blog post, we will learn terraform dynamic block. The dynamic block was Introduced to solve the challenge of dynamically generating a nested configuration blocks, the dynamic block is a powerful Terraform construct that allows you to build repeatable blocks based on complex data structures. What is the Terraform dynamic Block? The dynamic block … Read more

Mastering Terraform Test Block

Mastering Terraform Test Block

In today’s blog post, we will learn Terraform test block used for integration or unit testing and validations. Introduced in Terraform v1.5, the test and run blocks allow you to write detailed unit, integration, and even basic end-to-end tests directly in HCL. This removes the need for external frameworks for many common testing scenarios. This … Read more

Mastering Terraform Check Block

Mastering Terraform Check Block

In today’s blog post, we will learn Terraform check block used to define custom conditions that execute on every Terraform plan or apply operation without affecting the overall status of an operation.  Terraform is widely used for defining and managing your infrastructure’s desired state. But what if you need to assert conditions about your infrastructure’s state … Read more

Mastering Terraform Moved Block

Mastering Terraform Moved Block

In today’s blog post, we will discuss terraform moved block, used to rename or move terraform resources. Terraform is the most widely used Infrastructure as Code (IaC) tool in the cloud and DevOps field. But as your infrastructure as code (IaC) grows, refactoring your configurations becomes a nightmare. Renaming a resource, reorganizing modules, or switching … Read more

Mastering Terraform Ephemeral Resources

In today’s blog post, we will learn terraform ephemeral resources. Ephemeral resources are used to safely store and handle sensitive data (passwords, api tokens, secrets, hash) in terraform. Terraform is a declarative language where you declare your target infrastructure in the form of configuration files and terraform records those configuration changes in the state file. … Read more