Day 7 - Type Constraints in Terraform
Terraform has been feeling smooth so far. Define variables. Pass values. Resources get created. But today, I realized something important. Terraform is very trusting . And that can quietly become a problem. The moment it clicked Until now, I could pass almost anything as input. A string where a number was expected A wrong environment name like “testing” Even an invalid network CIDR Terraform wouldn’t complain immediately. The error would show up later… sometimes deep into execution. That’s not something you want when working on real infrastructure. What changed today Today was about type constraints . Instead of saying: “Give me some value” You start saying: “Give me exactly this type of value” That small shift adds a lot of control. Basic Types (simple, but powerful) Terraform supports three core types: string number bool At first glance, it feels basic. But defining these explicitly removes ambiguity. variables.tf showing: string numb...