locals { config = yamldecode(file("${path.root}/../config.yaml")) } module "config" { source = "../modules/config" infra = local.config.infra services = local.config.services } locals { services_with_buckets = { for name, svc in module.config.services : name => svc if length(svc.buckets) > 0 } }