Skip to content

Commit

Permalink
feat: Add module outputs for webhook-datasource (#17)
Browse files Browse the repository at this point in the history
* feat: Add module outputs for webhook-datasource

* Fix sink index for project and org cases
  • Loading branch information
ravinadhruve10 authored Jan 11, 2024
1 parent 850b209 commit 4d0985d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/services/webhook-datasource/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ No modules.
| Name | Description |
|------|-------------|
| <a name="output_push_endpoint"></a> [push\_endpoint](#output\_push\_endpoint) | Push endpoint towards which the POST request will be directed |
| <a name="output_ingestion_pubsub_topic_name"></a> [ingestion\_pubsub\_topic\_name](#output\_ingestion\_pubsub\_topic\_name) | PubSub ingestion topic that will hold all the AuditLogs coming from the specified project |
| <a name="output_ingestion_sink_name"></a> [ingestion\_sink\_name](#output\_ingestion\_sink\_name) | Project/Organization sink to direct the AuditLogs towards a dedicated PubSub topic |
| <a name="output_ingestion_push_subscription_name"></a> [ingestion\_push\_subscription\_name](#output\_ingestion\_push\_subscription\_name) | Push Subscription that will POST the AuditLogs collected from the project towards Sysdig's backend |
15 changes: 15 additions & 0 deletions modules/services/webhook-datasource/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,18 @@ output "push_endpoint" {
value = google_pubsub_subscription.ingestion_topic_push_subscription.push_config[0].push_endpoint
description = "Push endpoint towards which the POST request will be directed"
}

output "ingestion_pubsub_topic_name" {
value = google_pubsub_topic.ingestion_topic.name
description = "PubSub ingestion topic that will hold all the AuditLogs coming from the specified project"
}

output "ingestion_sink_name" {
value = var.is_organizational ? google_logging_organization_sink.ingestion_sink[0].name : google_logging_project_sink.ingestion_sink[0].name
description = "Project/Organization sink to direct the AuditLogs towards a dedicated PubSub topic"
}

output "ingestion_push_subscription_name" {
value = google_pubsub_subscription.ingestion_topic_push_subscription.name
description = "Push Subscription that will POST the AuditLogs collected from the project towards Sysdig's backend"
}

0 comments on commit 4d0985d

Please sign in to comment.