Choose values conditionally.
Section: Expressions and Functions
Conditional expression
hcl
hcl
instance_type = var.environment == "prod" ? "t3.large" : "t3.micro"Explanation
Choose values conditionally.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Expressions and Functions