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.
More on Loops, Conditionals, Dynamic Blocks and Functions
How does `count` work?BeginnerHow does `for_each` work?BeginnerWhen should you choose `for_each` over `count`?IntermediateHow do you use `for_each` with a list of objects?IntermediateWhat does "The for_each value depends on resource attributes that cannot be determined until apply" mean?AdvancedHow do you create a resource conditionally?Beginner