47 lines
1.5 KiB
HCL
47 lines
1.5 KiB
HCL
locals {
|
|
config_files = fileset(".", "**/*.yaml")
|
|
|
|
all_configs = {
|
|
for file_path in local.config_files :
|
|
file_path => yamldecode(file(file_path))
|
|
}
|
|
|
|
config = {
|
|
custom_formats = {
|
|
for file_path, content in local.all_configs :
|
|
trimsuffix(basename(file_path), ".yaml") => content
|
|
if startswith(file_path, "custom_format/")
|
|
}
|
|
quality_profiles = {
|
|
for file_path, content in local.all_configs :
|
|
trimsuffix(basename(file_path), ".yaml") => content
|
|
if startswith(file_path, "quality_profile/")
|
|
}
|
|
download_clients = {
|
|
for file_path, content in local.all_configs :
|
|
trimsuffix(basename(file_path), ".yaml") => content
|
|
if startswith(file_path, "download_client/")
|
|
}
|
|
indexers = {
|
|
for file_path, content in local.all_configs :
|
|
trimsuffix(basename(file_path), ".yaml") => content
|
|
if startswith(file_path, "indexer/")
|
|
}
|
|
notifications = {
|
|
for file_path, content in local.all_configs :
|
|
trimsuffix(basename(file_path), ".yaml") => content
|
|
if startswith(file_path, "notification/")
|
|
}
|
|
delay_profiles = {
|
|
for file_path, content in local.all_configs :
|
|
trimsuffix(basename(file_path), ".yaml") => content
|
|
if startswith(file_path, "delay_profile/")
|
|
}
|
|
root_folders = {
|
|
for file_path, content in local.all_configs :
|
|
trimsuffix(basename(file_path), ".yaml") => content
|
|
if startswith(file_path, "root_folder/")
|
|
}
|
|
}
|
|
}
|