I have a boolean use_bastion and I’m trying to set value based on condition but it fails due to inconsistent types.
value = var.use_bastion ? module.inf[0].worker : “”
Error: Inconsistent conditional result types
…
module.inf[0].worker is tuple with 3 elements
var.use_bastion is true
…
The true and false result expressions must have consistent types. The given expressions are tuple and string, respectively.
How can I make these types the same type for comparison? Or is there a better way to perform this comparison?