Resources and access
terraform / check (push) Waiting to run

This commit is contained in:
stolzor committed 2026-10-11 21:04:27 +03:00
1 parent 64be99308b
commit 5cba142003
38 files changed
+565 -353

No files matched your search

+32
View File
@@ -2,10 +2,42 @@ output "infra" {
value = var.infra
}
output "buckets" {
value = var.buckets
}
output "databases" {
value = {
for name, db in var.databases : name => merge(db, { owner = "${name}_owner" })
}
}
output "services" {
value = var.services
}
output "service_buckets" {
value = {
for name, svc in var.services : name => {
read_write = [for bucket, access in svc.buckets : bucket if access == "rw"]
read_only = [for bucket, access in svc.buckets : bucket if access == "ro"]
} if length(svc.buckets) > 0
}
}
output "service_databases" {
value = merge([
for name, svc in var.services : {
for db in svc.databases : "${name}-${db}" => {
service = name
database = db
role = "${name}-${db}"
owner = "${db}_owner"
}
}
]...)
}
output "vault" {
value = {
address = "http://${var.infra.vault.host}:${var.infra.vault.port}"