File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,15 @@ resource "sigsci_site" "ngwaf_edge_site" {
310310 block_duration_seconds = 86400
311311 agent_anon_mode = " "
312312 agent_level = var. ngwaf_agent_level # this setting dictates blocking mode
313- immediate_block = var. ngwaf_immediate_block
313+ immediate_block = var. ngwaf_baseline_protection ? false : var. ngwaf_immediate_block
314+
315+ dynamic "attack_threshold" {
316+ for_each = var. ngwaf_baseline_protection ? var. ngwaf_attack_thresholds : []
317+ content {
318+ interval = attack_threshold. value . interval
319+ threshold = attack_threshold. value . threshold
320+ }
321+ }
314322}
315323
316324resource "sigsci_edge_deployment_service_backend" "ngwaf_edge_service_backend_sync" {
Original file line number Diff line number Diff line change @@ -133,3 +133,32 @@ variable "ngwaf_percent_enabled" {
133133 type = number
134134 default = 100
135135}
136+
137+ variable "ngwaf_baseline_protection" {
138+ type = bool
139+ default = false
140+ description = " When true, disables immediate blocking and enables baseline attack threshold alerts."
141+ }
142+
143+ variable "ngwaf_attack_thresholds" {
144+ type = list (object ({
145+ interval = number
146+ threshold = number
147+ }))
148+ # To override the default thresholds, pass a custom list. Example:
149+ # ngwaf_attack_thresholds = [
150+ # { interval = 1, threshold = 50 },
151+ # { interval = 10, threshold = 200 },
152+ # { interval = 60, threshold = 1000 },
153+ # ]
154+ default = [
155+ { interval = 1 , threshold = 10 },
156+ { interval = 10 , threshold = 100 },
157+ { interval = 60 , threshold = 600 },
158+ ]
159+ description = " Attack threshold configurations applied when ngwaf_baseline_protection is enabled."
160+ validation {
161+ condition = length (var. ngwaf_attack_thresholds ) == 3
162+ error_message = " ngwaf_attack_thresholds must contain exactly 3 entries (one each for the 1, 10, and 60 minute intervals)."
163+ }
164+ }
You can’t perform that action at this time.
0 commit comments