Terraform Interpolation Syntax

Conditionals

Interpolations can contain conditionals. E.g.

using ternary operation:

i.e. if var.env == "production"

then subnet = var.prod_subnet

else subnet = var.dev_subnet

 

https://www.terraform.io/docs/configuration/interpolation.html#conditionals

Leave a Reply

Your email address will not be published. Required fields are marked *