How can I use the and operator and the or operator in the same if statement?
Below the code:
bundles = flatten([
for cluster, data in var.clusters : [
for bundle, config in data["bundles"] : {
cluster = cluster
bundle = bundle
settings = templatefile("${local.files}/${bundle}.tftpl", { config = config, globals = merge(local.values[bundle], {cluster = cluster}) })
} if (config["enabled"] != null && config["settings"] != null) || config["enabled"] != false
]
])
The if statement contains the following sections:
First section: config["enabled"] != null && config["settings"] != null
Second section: config["enabled"] != false
Both sections needs to equal true
or false
. The if statement needs to seperates the sections with the or statement. Is there a way this is possible?