locals { config_files = fileset(".", "**/*.yaml") all_configs = { for file_path in local.config_files : file_path => yamldecode(file(file_path)) } config = { remote_alpine = { for file_path, content in local.all_configs : trimsuffix(basename(file_path), ".yaml") => content if startswith(file_path, "remote_alpine/") } remote_docker = { for file_path, content in local.all_configs : trimsuffix(basename(file_path), ".yaml") => content if startswith(file_path, "remote_docker/") } remote_generic = { for file_path, content in local.all_configs : trimsuffix(basename(file_path), ".yaml") => content if startswith(file_path, "remote_generic/") } remote_goproxy = { for file_path, content in local.all_configs : trimsuffix(basename(file_path), ".yaml") => content if startswith(file_path, "remote_goproxy/") } remote_helm = { for file_path, content in local.all_configs : trimsuffix(basename(file_path), ".yaml") => content if startswith(file_path, "remote_helm/") } remote_rpm = { for file_path, content in local.all_configs : trimsuffix(basename(file_path), ".yaml") => content if startswith(file_path, "remote_rpm/") } virtual = { for file_path, content in local.all_configs : trimsuffix(basename(file_path), ".yaml") => content if startswith(file_path, "virtual/") } } }