Skip to content

Commit 4d0985d

Browse files
feat: Add module outputs for webhook-datasource (#17)
* feat: Add module outputs for webhook-datasource * Fix sink index for project and org cases
1 parent 850b209 commit 4d0985d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

modules/services/webhook-datasource/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ No modules.
6262
| Name | Description |
6363
|------|-------------|
6464
| <a name="output_push_endpoint"></a> [push\_endpoint](#output\_push\_endpoint) | Push endpoint towards which the POST request will be directed |
65+
| <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 |
66+
| <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 |
67+
| <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 |

modules/services/webhook-datasource/outputs.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,18 @@ output "push_endpoint" {
22
value = google_pubsub_subscription.ingestion_topic_push_subscription.push_config[0].push_endpoint
33
description = "Push endpoint towards which the POST request will be directed"
44
}
5+
6+
output "ingestion_pubsub_topic_name" {
7+
value = google_pubsub_topic.ingestion_topic.name
8+
description = "PubSub ingestion topic that will hold all the AuditLogs coming from the specified project"
9+
}
10+
11+
output "ingestion_sink_name" {
12+
value = var.is_organizational ? google_logging_organization_sink.ingestion_sink[0].name : google_logging_project_sink.ingestion_sink[0].name
13+
description = "Project/Organization sink to direct the AuditLogs towards a dedicated PubSub topic"
14+
}
15+
16+
output "ingestion_push_subscription_name" {
17+
value = google_pubsub_subscription.ingestion_topic_push_subscription.name
18+
description = "Push Subscription that will POST the AuditLogs collected from the project towards Sysdig's backend"
19+
}

0 commit comments

Comments
 (0)