Use instance_market_options in launch template with condition

Hey, can any one help me that how can i get this to work:

instance_market_options = “${var.use_spot_instances == “no” ? {} : { market_type = “spot” spot_options { block_duration_minutes = var.block_duration_minutes instance_interruption_behavior = “var.instance_interruption_behavior” max_price = var.max_price spot_instance_type = “persistent”}}}”

Cannot use map with conditions