forked from claranet/terraform-azurerm-app-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
locals.tf
43 lines (39 loc) · 1.12 KB
/
locals.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
locals {
subnet_id = var.create_subnet ? module.azure_network_subnet["appgw_subnet"].subnet_id : var.subnet_id
enable_waf = var.sku == "WAF_v2" ? true : false
default_tags = {
env = var.environment
stack = var.stack
}
# https://docs.microsoft.com/fr-fr/azure/api-management/api-management-howto-integrate-internal-vnet-appgateway#exposing-the-developer-portal-externally-through-application-gateway
disabled_rule_group_settings_dev_portal = [
{
rule_group_name = "REQUEST-942-APPLICATION-ATTACK-SQLI"
rules = [
942100,
942200,
942110,
942180,
942260,
942340,
942370,
942430,
942440
]
},
{
rule_group_name = "REQUEST-920-PROTOCOL-ENFORCEMENT"
rules = [
920300,
920330
]
},
{
rule_group_name = "REQUEST-931-APPLICATION-ATTACK-RFI"
rules = [
931130
]
}
]
disabled_rule_group_settings = var.disable_waf_rules_for_dev_portal ? concat(local.disabled_rule_group_settings_dev_portal, var.disabled_rule_group_settings) : var.disabled_rule_group_settings
}