feat(vaultwarden): add SMTP configuration options and enhance signup settings
- Introduced SMTP settings for Vaultwarden including host, port, security, and authentication details. - Added variables for signup verification, 2FA settings, password hints, and logging options. - Updated Vaultwarden deployment to utilize new SMTP configurations. - Enhanced Grafana module to support dynamic dashboard and datasource provisioning. - Added LLM proxy configuration for Open Web UI with necessary environment variables.
This commit is contained in:
@@ -2,8 +2,47 @@ locals {
|
||||
app_version = var.tag
|
||||
monitoring_folder = "${var.persistent_folder}/grafana"
|
||||
|
||||
grafana_datasource_config = file("${path.module}/resources/default.yml")
|
||||
grafana_dashboard_provider = file("${path.module}/resources/dashboard-provider.yml")
|
||||
grafana_trivy_dashboard = file("${path.module}/resources/trivy-vulnerabilities-dashboard.json")
|
||||
grafana_gpu_realtime_dashboard = file("${path.module}/resources/gpu-realtime-dashboard.json")
|
||||
dashboard_resource_names = {
|
||||
for folder_name in keys(var.dashboard_folder) :
|
||||
folder_name => "${substr(replace(lower(folder_name), "/[^a-z0-9-]/", "-"), 0, 40)}-${substr(md5(folder_name), 0, 8)}"
|
||||
}
|
||||
|
||||
dashboard_mount_paths = {
|
||||
for folder_name in keys(var.dashboard_folder) :
|
||||
folder_name => "/var/lib/grafana/dashboards/${local.dashboard_resource_names[folder_name]}"
|
||||
}
|
||||
|
||||
# Load datasource YAMLs from app root if datasource_folder is provided
|
||||
datasource_files = {
|
||||
for f in fileset(var.datasource_folder, "*.{yml,yaml}") : f => file("${var.datasource_folder}/${f}")
|
||||
}
|
||||
|
||||
# Load dashboard JSONs from app root folders grouped by Grafana category name
|
||||
dashboard_files_by_category = {
|
||||
for folder_name, folder_path in var.dashboard_folder :
|
||||
folder_name => {
|
||||
for f in fileset(folder_path, "*.json") : f => file("${folder_path}/${f}")
|
||||
}
|
||||
}
|
||||
|
||||
grafana_dashboard_provider = yamlencode({
|
||||
apiVersion = 1
|
||||
providers = [
|
||||
for folder_name in keys(var.dashboard_folder) : {
|
||||
name = "local-${local.dashboard_resource_names[folder_name]}"
|
||||
orgId = 1
|
||||
folder = folder_name
|
||||
type = "file"
|
||||
disableDeletion = false
|
||||
updateIntervalSeconds = 30
|
||||
allowUiUpdates = true
|
||||
options = {
|
||||
path = local.dashboard_mount_paths[folder_name]
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
checksum_datasources = md5(join("", values(local.datasource_files)))
|
||||
checksum_dashboards = md5("${local.grafana_dashboard_provider}${jsonencode(local.dashboard_files_by_category)}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user