locals {
bucket_settings = {
"bucket_1" = { location = "europe-west4", bucket_policy_only = false },
"secrets" = { location = "europe-west1", bucket_policy_only = true },
"documents" = { location = "europe-west1", bucket_policy_only = true },
"public" = { location = "europe-west4", bucket_policy_only = false }
}
}
resource "google_storage_bucket" "map" {
for_each = local.bucket_settings
name = each.key
location = each.value.location
storage_class = "REGIONAL"
bucket_policy_only = each.value.bucket_policy_only
}