Fix FAST audit logs when using pubsub as destination

This commit also splits each organization-level logging sink of type
`logging` to a separate logging bucket.
This commit is contained in:
Julio Castillo
2022-06-10 10:29:13 +02:00
parent f75c0021a1
commit 0bf1880431
7 changed files with 40 additions and 23 deletions

View File

@@ -19,6 +19,21 @@ output "bucket" {
value = google_storage_bucket.bucket
}
# We add `id` as an alias to `name` to simplify log sink handling.
# Since all other log destinations (pubsub, logging-bucket, bigquery)
# have an id output, it is convenient to have in this module too to
# handle all log destination as homogeneous objects (i.e. you can
# assume any valid log destination has an `id` output).
output "id" {
description = "Bucket ID (same as name)."
value = "${local.prefix}${lower(var.name)}"
depends_on = [
google_storage_bucket.bucket,
google_storage_bucket_iam_binding.bindings
]
}
output "name" {
description = "Bucket name."
value = "${local.prefix}${lower(var.name)}"
@@ -27,14 +42,17 @@ output "name" {
google_storage_bucket_iam_binding.bindings
]
}
output "notification" {
description = "GCS Notification self link."
value = local.notification ? google_storage_notification.notification[0].self_link : null
}
output "topic" {
description = "Topic ID used by GCS."
value = local.notification ? google_pubsub_topic.topic[0].id : null
}
output "url" {
description = "Bucket URL."
value = google_storage_bucket.bucket.url