mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-05 18:31:00 +03:00
43 lines
1.7 KiB
HCL
43 lines
1.7 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
|
|
}
|
|
|
|
output "service_accounts" {
|
|
description = "Map of additional YC service accounts (name => data)"
|
|
value = {
|
|
for name, sa in yandex_iam_service_account.custom_sa : name => {
|
|
service_account_id = sa.id
|
|
access_key = try(yandex_iam_service_account_static_access_key.custom_sa_key[name].access_key, "")
|
|
secret_key = try(yandex_iam_service_account_static_access_key.custom_sa_key[name].secret_key, "")
|
|
folder_roles = try(local.yc_service_accounts_map[name].folder_roles, [])
|
|
}
|
|
}
|
|
sensitive = true
|
|
}
|