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.worker : “”
Error: Inconsistent conditional result types
module.inf.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?