File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -14,20 +14,19 @@ resource "aws_wafv2_web_acl" "main" {
14
14
}
15
15
16
16
dynamic "rule" {
17
- # for_each = var.header_match_rules == null ? {} : var.header_match_rules
18
17
for_each = var. header_match_rules == null ? {} : var. header_match_rules
19
18
content {
20
- name = " ${ header_rule . value [" name" ]} -header-match-rule"
21
- priority = header_rule . value [" priority" ]
19
+ name = " ${ rule . value [" name" ]} -header-match-rule"
20
+ priority = rule . value [" priority" ]
22
21
23
22
dynamic "action" {
24
- for_each = header_rule . value [" count_override" ] == true ? [1 ] : []
23
+ for_each = rule . value [" count_override" ] == true ? [1 ] : []
25
24
content {
26
25
count {}
27
26
}
28
27
}
29
28
dynamic "action" {
30
- for_each = header_rule . value [" count_override" ] == false ? [1 ] : []
29
+ for_each = rule . value [" count_override" ] == false ? [1 ] : []
31
30
content {
32
31
block {}
33
32
}
@@ -36,13 +35,13 @@ resource "aws_wafv2_web_acl" "main" {
36
35
byte_match_statement {
37
36
field_to_match {
38
37
single_header {
39
- name = lower (header_rule . value [" header_name" ])
38
+ name = lower (rule . value [" header_name" ])
40
39
}
41
40
}
42
41
43
42
positional_constraint = " CONTAINS"
44
43
45
- search_string = header_rule . value [" header_value" ]
44
+ search_string = rule . value [" header_value" ]
46
45
47
46
text_transformation {
48
47
priority = 1
You can’t perform that action at this time.
0 commit comments