From 31867fe7f83730e8f6174ad1805de7e400cb1b90 Mon Sep 17 00:00:00 2001 From: Filippo Date: Thu, 22 Jan 2026 16:18:46 +0100 Subject: [PATCH 1/2] feat: add outputs for disaster recovery bucket names and maps --- README.md | 3 +++ outputs.tf | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index edb4efc..c7a58de 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,10 @@ want to import existing buckets with a known name. | [buckets\_access\_credentials](#output\_buckets\_access\_credentials) | Access credentials for the application buckets | | [details\_of\_used\_tag\_keys](#output\_details\_of\_used\_tag\_keys) | Details of all the tag keys passed to this module (globals and per bucket). | | [details\_of\_used\_tag\_values](#output\_details\_of\_used\_tag\_values) | Details of all the tag values passed to this module (globals and per bucket). | +| [disaster\_recovery\_bucket\_names](#output\_disaster\_recovery\_bucket\_names) | The list with the names of the disaster recovery buckets. | +| [disaster\_recovery\_bucket\_names\_map](#output\_disaster\_recovery\_bucket\_names\_map) | Map from input bucket name to disaster recovery bucket name. | | [generated\_bucket\_names](#output\_generated\_bucket\_names) | The list with the names of the buckets managed by this module. | +| [generated\_bucket\_names\_map](#output\_generated\_bucket\_names\_map) | Map from input bucket name to generated bucket name (with random suffix if enabled). | ## Resources | Name | Type | diff --git a/outputs.tf b/outputs.tf index 610a85a..07f7e2f 100644 --- a/outputs.tf +++ b/outputs.tf @@ -25,3 +25,18 @@ output "generated_bucket_names" { description = "The list with the names of the buckets managed by this module." value = [for k, v in local.generated_bucket_names : v] } + +output "generated_bucket_names_map" { + description = "Map from input bucket name to generated bucket name (with random suffix if enabled)." + value = local.generated_bucket_names +} + +output "disaster_recovery_bucket_names" { + description = "The list with the names of the disaster recovery buckets." + value = [for k, bucket in google_storage_bucket.disaster_recovery : bucket.name] +} + +output "disaster_recovery_bucket_names_map" { + description = "Map from input bucket name to disaster recovery bucket name." + value = { for k, bucket in google_storage_bucket.disaster_recovery : k => bucket.name } +} From 9f6ef9e8ceee5fc9d8583f2b6cb9a41d45082ca0 Mon Sep 17 00:00:00 2001 From: Filippo Merante Caparrotta <61194571+filippolmt@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:45:08 +0100 Subject: [PATCH 2/2] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1e28e2..bf76912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added -- Added output`disaster_recovery_bucket_names` to provide a map from input bucket names to disaster recovery bucket names. +- Added output `disaster_recovery_bucket_names` to provide a map from input bucket names to disaster recovery bucket names. ### Fixed