feat: first version

This commit is contained in:
VC
2025-10-22 15:58:46 +02:00
parent 2a74b6cf6c
commit 5ed688ff16
14 changed files with 214 additions and 2 deletions

22
modules/buckets/main.tf Normal file
View File

@@ -0,0 +1,22 @@
resource "garage_bucket" "bucket" {
website_access_enabled = var.website_access_enabled
website_config_index_document = var.website_access_enabled == true ? "index.html" : null
}
resource "garage_bucket_global_alias" "bucket_alias" {
bucket_id = garage_bucket.bucket.id
for_each = toset(local.aliases)
alias = each.key
}
resource "garage_bucket_key" "authorized_keys" {
bucket_id = garage_bucket.bucket.id
for_each = var.allowed_keys
access_key_id = var.global_keys[each.key].access_key_id
read = each.value.read
write = each.value.write
owner = each.value.owner
}