Interview Prep/Terraform/Loops, Conditionals, Dynamic Blocks and Functions

What is the conditional expression syntax?

BeginnerConceptLoops, Conditionals, Dynamic Blocks and Functions
Answer

condition ? true_value : false_value. Both results must be of compatible types. It is used for toggling arguments (var.env == "prod" ? "m5.large" : "t3.small") and for count toggles.

All Terraform questions Roadmap: Terraform

More on Loops, Conditionals, Dynamic Blocks and Functions