Is there a way AND/OR conditional operator in terraform?

This is more appropriate in the actual version (0.12.X)

The supported operators are:

Equality: == and !=
Numerical comparison: >, <, >=, <=
Boolean logic: &&, ||, unary !

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

condition_one and condition two:

count = var.condition_one && var.condition_two ? 1 : 0

condition_one and NOT condition_two:

count = var.condition_one && !var.condition_two ? 1 : 0

condition_one OR condition_two:

count = var.condition_one || var.condition_two ? 1 : 0

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)