Added GCS notification support (#335)

* Added GCS notification support

* fixed notification output indices

* merged vars and added more conditional validation

* Terraform linting

* Added sa_email serviceAccount variable

* Fixed bool check and use try in notification var

* Fixed typo source path example block

* Fixed assert number tftest gcs example
This commit is contained in:
Caio Tavares
2021-10-21 10:27:35 -04:00
committed by GitHub
parent 1f455fbcba
commit f74599a317
4 changed files with 62 additions and 6 deletions

View File

@@ -23,7 +23,14 @@ output "name" {
description = "Bucket name."
value = google_storage_bucket.bucket.name
}
output "notification" {
description = "GCS Notification self link."
value = local.notification == true ? google_storage_notification.notification[0].self_link : null
}
output "topic" {
description = "Topic ID used by GCS."
value = local.notification == true ? google_pubsub_topic.topic[0].id : null
}
output "url" {
description = "Bucket URL."
value = google_storage_bucket.bucket.url