From 8fb3ea48b38f573fc691e40e23c76d996d057ea2 Mon Sep 17 00:00:00 2001 From: sunny2895 Date: Mon, 2 Mar 2026 16:34:11 -0700 Subject: [PATCH 1/6] feat(fastly_waf): add Slack alerting integration for WAF events --- google_fastly_waf/main.tf | 8 ++++++++ google_fastly_waf/outputs.tf | 4 ++++ google_fastly_waf/variables.tf | 11 +++++++++++ 3 files changed, 23 insertions(+) diff --git a/google_fastly_waf/main.tf b/google_fastly_waf/main.tf index ff2f26e5..6687ab52 100644 --- a/google_fastly_waf/main.tf +++ b/google_fastly_waf/main.tf @@ -323,3 +323,11 @@ resource "sigsci_edge_deployment_service_backend" "ngwaf_edge_service_backend_sy sigsci_edge_deployment_service.ngwaf_edge_service_link, ] } + +### Slack Alerting Integration for WAF Events +resource "sigsci_site_integration" "slack_logging_mode_alerts" { + site_short_name = var.sigsci_site_short_name + type = "slack" + url = var.slack_logging_webhook_url + events = ["loggingModeChanged"] +} \ No newline at end of file diff --git a/google_fastly_waf/outputs.tf b/google_fastly_waf/outputs.tf index d0f6cfb7..de2afcb0 100644 --- a/google_fastly_waf/outputs.tf +++ b/google_fastly_waf/outputs.tf @@ -5,3 +5,7 @@ output "ngwaf_edgesite_short_name" { output "certificate_verification_information" { value = fastly_tls_subscription.fastly.*.managed_dns_challenges } + +output "slack_logging_integration_id" { + value = sigsci_site_integration.slack_logging_mode_alerts.id +} \ No newline at end of file diff --git a/google_fastly_waf/variables.tf b/google_fastly_waf/variables.tf index e2af3459..5e491c04 100644 --- a/google_fastly_waf/variables.tf +++ b/google_fastly_waf/variables.tf @@ -133,3 +133,14 @@ variable "ngwaf_percent_enabled" { type = number default = 100 } + +variable "sigsci_site_short_name" { + type = string + default = "" +} + +variable "slack_logging_webhook_url" { + type = string + sensitive = true + default = "https://hooks.slack.com/services/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" +} \ No newline at end of file From cc6491bff487b1a0a2d3cad4c4ec68ab586dc9ca Mon Sep 17 00:00:00 2001 From: sunny2895 Date: Mon, 2 Mar 2026 16:36:52 -0700 Subject: [PATCH 2/6] fix(google_fastly_waf): remove sensitive flag from Slack webhook URL variable --- google_fastly_waf/variables.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/google_fastly_waf/variables.tf b/google_fastly_waf/variables.tf index 5e491c04..4deb737a 100644 --- a/google_fastly_waf/variables.tf +++ b/google_fastly_waf/variables.tf @@ -141,6 +141,5 @@ variable "sigsci_site_short_name" { variable "slack_logging_webhook_url" { type = string - sensitive = true default = "https://hooks.slack.com/services/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" } \ No newline at end of file From 614bda05de3f4ea78ba6c76ed3d77949d1c00b03 Mon Sep 17 00:00:00 2001 From: sunny2895 Date: Mon, 2 Mar 2026 16:37:18 -0700 Subject: [PATCH 3/6] fix(google_fastly_waf): mark Slack logging webhook URL as sensitive --- google_fastly_waf/variables.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/google_fastly_waf/variables.tf b/google_fastly_waf/variables.tf index 4deb737a..5e491c04 100644 --- a/google_fastly_waf/variables.tf +++ b/google_fastly_waf/variables.tf @@ -141,5 +141,6 @@ variable "sigsci_site_short_name" { variable "slack_logging_webhook_url" { type = string + sensitive = true default = "https://hooks.slack.com/services/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" } \ No newline at end of file From 635661e03097b729047d217bfda0338d60bb5336 Mon Sep 17 00:00:00 2001 From: sunny2895 Date: Mon, 2 Mar 2026 16:52:07 -0700 Subject: [PATCH 4/6] fix(google_fastly_waf): mark Slack logging webhook URL as sensitive and update default value --- google_fastly_waf/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google_fastly_waf/variables.tf b/google_fastly_waf/variables.tf index 5e491c04..4a09dd39 100644 --- a/google_fastly_waf/variables.tf +++ b/google_fastly_waf/variables.tf @@ -142,5 +142,5 @@ variable "sigsci_site_short_name" { variable "slack_logging_webhook_url" { type = string sensitive = true - default = "https://hooks.slack.com/services/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" + default = "TBD" } \ No newline at end of file From 2731264232d6d4362215ca730639f0f9c6c40a18 Mon Sep 17 00:00:00 2001 From: sunny2895 Date: Tue, 3 Mar 2026 09:32:36 -0700 Subject: [PATCH 5/6] feat(google_fastly_waf): add enable_slack_logging_mode_alerts variable and update Slack integration resource --- google_fastly_waf/main.tf | 5 +++-- google_fastly_waf/variables.tf | 13 +++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/google_fastly_waf/main.tf b/google_fastly_waf/main.tf index 6687ab52..b4ef05db 100644 --- a/google_fastly_waf/main.tf +++ b/google_fastly_waf/main.tf @@ -326,8 +326,9 @@ resource "sigsci_edge_deployment_service_backend" "ngwaf_edge_service_backend_sy ### Slack Alerting Integration for WAF Events resource "sigsci_site_integration" "slack_logging_mode_alerts" { - site_short_name = var.sigsci_site_short_name + count = var.enable_slack_logging_mode_alerts ? 1 : 0 + site_short_name = sigsci_site.ngwaf_edge_site.short_name type = "slack" url = var.slack_logging_webhook_url events = ["loggingModeChanged"] -} \ No newline at end of file +} diff --git a/google_fastly_waf/variables.tf b/google_fastly_waf/variables.tf index 4a09dd39..7c119601 100644 --- a/google_fastly_waf/variables.tf +++ b/google_fastly_waf/variables.tf @@ -134,13 +134,14 @@ variable "ngwaf_percent_enabled" { default = 100 } -variable "sigsci_site_short_name" { - type = string - default = "" -} - variable "slack_logging_webhook_url" { type = string sensitive = true default = "TBD" -} \ No newline at end of file +} + +variable "enable_slack_logging_mode_alerts" { + description = "Enable or disable the Slack integration for logging mode change alerts" + type = bool + default = true +} From 413ff23af3decbb909f6566073d8c89e25d8fcd1 Mon Sep 17 00:00:00 2001 From: sunny2895 Date: Tue, 3 Mar 2026 09:41:13 -0700 Subject: [PATCH 6/6] feat(google_fastly_waf): update slack_logging_integration_id output to conditionally return ID based on enable_slack_logging_mode_alerts variable --- google_fastly_waf/outputs.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google_fastly_waf/outputs.tf b/google_fastly_waf/outputs.tf index de2afcb0..e41f4004 100644 --- a/google_fastly_waf/outputs.tf +++ b/google_fastly_waf/outputs.tf @@ -7,5 +7,5 @@ output "certificate_verification_information" { } output "slack_logging_integration_id" { - value = sigsci_site_integration.slack_logging_mode_alerts.id -} \ No newline at end of file + value = var.enable_slack_logging_mode_alerts ? sigsci_site_integration.slack_logging_mode_alerts[0].id : null +}