Skip to content

Commit 31867fe

Browse files
committed
feat: add outputs for disaster recovery bucket names and maps
1 parent d9cbd19 commit 31867fe

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ want to import existing buckets with a known name.
9999
| <a name="output_buckets_access_credentials"></a> [buckets\_access\_credentials](#output\_buckets\_access\_credentials) | Access credentials for the application buckets |
100100
| <a name="output_details_of_used_tag_keys"></a> [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). |
101101
| <a name="output_details_of_used_tag_values"></a> [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). |
102+
| <a name="output_disaster_recovery_bucket_names"></a> [disaster\_recovery\_bucket\_names](#output\_disaster\_recovery\_bucket\_names) | The list with the names of the disaster recovery buckets. |
103+
| <a name="output_disaster_recovery_bucket_names_map"></a> [disaster\_recovery\_bucket\_names\_map](#output\_disaster\_recovery\_bucket\_names\_map) | Map from input bucket name to disaster recovery bucket name. |
102104
| <a name="output_generated_bucket_names"></a> [generated\_bucket\_names](#output\_generated\_bucket\_names) | The list with the names of the buckets managed by this module. |
105+
| <a name="output_generated_bucket_names_map"></a> [generated\_bucket\_names\_map](#output\_generated\_bucket\_names\_map) | Map from input bucket name to generated bucket name (with random suffix if enabled). |
103106
## Resources
104107

105108
| Name | Type |

outputs.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,18 @@ output "generated_bucket_names" {
2525
description = "The list with the names of the buckets managed by this module."
2626
value = [for k, v in local.generated_bucket_names : v]
2727
}
28+
29+
output "generated_bucket_names_map" {
30+
description = "Map from input bucket name to generated bucket name (with random suffix if enabled)."
31+
value = local.generated_bucket_names
32+
}
33+
34+
output "disaster_recovery_bucket_names" {
35+
description = "The list with the names of the disaster recovery buckets."
36+
value = [for k, bucket in google_storage_bucket.disaster_recovery : bucket.name]
37+
}
38+
39+
output "disaster_recovery_bucket_names_map" {
40+
description = "Map from input bucket name to disaster recovery bucket name."
41+
value = { for k, bucket in google_storage_bucket.disaster_recovery : k => bucket.name }
42+
}

0 commit comments

Comments
 (0)