Category Terraform Practice Lab

TFLAB13-Conditional Expressions: If-Then-Else in HCL

Conditional Expressions: If-Then-Else in HCL 🔧 Terraform Core ⭐ Beginner Ternary Operator Conditional Attributes Conditional Tags Scenario Different environments need different configurations: production buckets should have versioning enabled and a compliance tag; dev buckets should not. Instead of maintaining separate…

TFLAB23-Module Sources and Versioning

Module Sources and Versioning 🔧 Terraform Core ⭐ Intermediate Module Sources Terraform Registry Git Source version constraint Scenario Your team has been using a local module for S3 buckets. Now you want to try a public module from the Terraform…

TFLAB22-Writing Your First Terraform Module

Writing Your First Terraform Module 🔧 Terraform Core ⭐ Intermediate module Module Structure source Module Inputs/Outputs Scenario You’ve been copying the same S3 bucket + versioning + encryption config across 6 different projects. Every copy has slight variations and bugs.…

TFLAB21-precondition, postcondition and check Blocks

precondition, postcondition and check Blocks 🔧 Terraform Core ⭐ Intermediate precondition postcondition check block assert Custom Validation Scenario You want to catch errors at three different levels: before a resource is created (bad assumptions), after it’s created (unexpected cloud behavior),…