Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for object upload to gcs module #1584

Merged
5 changes: 3 additions & 2 deletions modules/gcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ module "bucket" {
| [id](outputs.tf#L28) | Fully qualified bucket id. | |
| [name](outputs.tf#L37) | Bucket name. | |
| [notification](outputs.tf#L46) | GCS Notification self link. | |
| [topic](outputs.tf#L51) | Topic ID used by GCS. | |
| [url](outputs.tf#L56) | Bucket URL. | |
| [objects](outputs.tf#L51) | Objects in GCS bucket. | |
| [topic](outputs.tf#L63) | Topic ID used by GCS. | |
| [url](outputs.tf#L68) | Bucket URL. | |
<!-- END TFDOC -->
12 changes: 12 additions & 0 deletions modules/gcs/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ output "notification" {
value = local.notification ? google_storage_notification.notification[0].self_link : null
}

output "objects" {
description = "Objects in GCS bucket."
value = { for k, v in google_storage_bucket_object.objects : k => {
crc32c = v.crc32c
md5hash = v.md5hash
self_link = v.self_link
output_name = v.output_name
media_link = v.media_link
}
}
juliocc marked this conversation as resolved.
Show resolved Hide resolved
}

output "topic" {
description = "Topic ID used by GCS."
value = local.notification ? google_pubsub_topic.topic[0].id : null
Expand Down