mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-05 18:31:00 +03:00
- Remove yandex_resourcemanager_folder_iam_member with storage.editor - Add yandex_storage_bucket_policy for bucket-level access control - SA now has access only to its own bucket via bucket policy - Add role variable (storage.uploader, storage.viewer, storage.editor) - Add README.md with module documentation - Remove comments from module files
30 lines
1.2 KiB
HCL
30 lines
1.2 KiB
HCL
output "bucket_name" {
|
|
description = "Name of the first bucket (for backward compatibility)"
|
|
value = length(var.buckets) > 0 ? yandex_storage_bucket.this[var.buckets[0].name].bucket : ""
|
|
}
|
|
|
|
output "access_key" {
|
|
description = "Access key for the first bucket (for backward compatibility)"
|
|
value = length(var.buckets) > 0 ? yandex_iam_service_account_static_access_key.sa_key[var.buckets[0].name].access_key : ""
|
|
sensitive = true
|
|
}
|
|
|
|
output "secret_key" {
|
|
description = "Secret key for the first bucket (for backward compatibility)"
|
|
value = length(var.buckets) > 0 ? yandex_iam_service_account_static_access_key.sa_key[var.buckets[0].name].secret_key : ""
|
|
sensitive = true
|
|
}
|
|
|
|
output "buckets" {
|
|
description = "Map of all buckets (name => data)"
|
|
value = {
|
|
for name, bucket in yandex_storage_bucket.this : name => {
|
|
bucket_name = bucket.bucket
|
|
access_key = yandex_iam_service_account_static_access_key.sa_key[name].access_key
|
|
secret_key = yandex_iam_service_account_static_access_key.sa_key[name].secret_key
|
|
service_account_id = yandex_iam_service_account.sa[name].id
|
|
}
|
|
}
|
|
sensitive = true
|
|
}
|