1- provider "aws" {
2- region = " ap-northeast-2"
3- }
4-
51module "fms01" {
62 source = " ../..//"
73
@@ -12,148 +8,127 @@ module "fms01" {
128 " account" : [" 111111111111" , " 222222222222" ]
139 }
1410 managed_service_data = {
15- preProcessRuleGroups = [
11+ " preProcessRuleGroups" : [
1612 {
17- " ruleGroupArn " : null ,
13+ " ruleGroupType " : " RuleGroup " ,
1814 " overrideAction" : {
1915 " type" : " NONE"
2016 },
21- " managedRuleGroupIdentifier" : {
22- " versionEnabled" : null ,
23- " version" : null ,
24- " vendorName" : " AWS" ,
25- " managedRuleGroupName" : " AWSManagedRulesKnownBadInputsRuleSet"
26- },
27- " ruleGroupType" : " ManagedRuleGroup" ,
17+ " sampledRequestsEnabled" : true ,
2818 " excludeRules" : [],
29- " sampledRequestsEnabled" : true
19+ " ruleGroupArn" : " " ,
20+ " ruleGroupName" : " BLOCK_IP_ADDRESS"
3021 }
3122 ]
32- default_action = " allow"
33- sampledRequestsEnabledForDefaultActions = true
23+ " defaultAction" : { " type" : " ALLOW" },
24+ " type" : " WAFV2" ,
25+ " overrideCustomerWebACLAssociation" : false ,
26+ " sampledRequestsEnabledForDefaultActions" : true ,
27+ " optimizeUnassociatedWebACL" : false ,
28+ # 'DEFAULT' or 'RETROFIT_EXISTING'
29+ " webACLSource" : " DEFAULT"
3430 }
3531}
3632
37- module "fms02" {
38- source = " ../..//"
39-
40- name = " fms02"
41- type = " WAFV2"
42- resource_type_list = [" AWS::ElasticLoadBalancingV2::LoadBalancer" , " AWS::ApiGateway::Stage" ]
43- include_map = {
44- " account" : [" 111111111111" ]
45- }
46- managed_service_data = {
47- preProcessRuleGroups = [
48- {
49- " ruleGroupArn" : null ,
50- " overrideAction" : {
51- " type" : " NONE"
52- },
53- " managedRuleGroupIdentifier" : {
54- " versionEnabled" : true ,
55- " version" : null ,
56- " vendorName" : " AWS" ,
57- " managedRuleGroupName" : " AWSManagedRulesATPRuleSet" ,
58- " managedRuleGroupConfigs" : [
59- {
60- " awsmanagedRulesATPRuleSet" : {
61- " loginPath" : " /web/login" ,
62- " requestInspection" : {
63- " payloadType" : " JSON" ,
64- " usernameField" : {
65- " identifier" : " /form/username"
66- },
67- " passwordField" : {
68- " identifier" : " /form/password"
69- }
70- }
71- }
72- }
73- ]
74- },
75- " ruleGroupType" : " ManagedRuleGroup" ,
76- " excludeRules" : [],
77- " sampledRequestsEnabled" : true ,
78- " ruleActionOverrides" : [
79- {
80- " name" : " AttributeCompromisedCredentials" ,
81- " actionToUse" : {
82- " challenge" : {}
83- }
84- },
85- {
86- " name" : " AttributeLongSession" ,
87- " actionToUse" : {
88- " challenge" : {}
89- }
90- },
91- {
92- " name" : " AttributePasswordTraversal" ,
93- " actionToUse" : {
94- " challenge" : {}
95- }
96- },
97- {
98- " name" : " AttributeUsernameTraversal" ,
99- " actionToUse" : {
100- " challenge" : {}
101- }
102- },
103- {
104- " name" : " SignalMissingCredential" ,
105- " actionToUse" : {
106- " challenge" : {}
107- }
108- },
109- {
110- " name" : " TokenRejected" ,
111- " actionToUse" : {
112- " challenge" : {}
113- }
114- },
115- {
116- " name" : " UnsupportedCognitoIDP" ,
117- " actionToUse" : {
118- " challenge" : {}
119- }
120- },
121- {
122- " name" : " VolumetricIpHigh" ,
123- " actionToUse" : {
124- " challenge" : {}
125- }
126- },
127- {
128- " name" : " VolumetricSession" ,
129- " actionToUse" : {
130- " challenge" : {}
131- }
132- }
133- ]
134- }
135- ]
136- default_action = " block"
137- customResponse = {
138- " enableCustomResponse" : true ,
139- " customResponseBodyKey" : " fms" ,
140- " responseCode" : 403 ,
141- " responseHeaders" : [
142- {
143- " headerName" : " x-custom-response" ,
144- " headerValue" : " fms"
145- }
146- ],
147- " customResponseBodies" : {
148- " fms" : {
149- " responseBodyType" : " APPLICATION_JSON" ,
150- " responseBody" : " {\" error\" : \" accessDenied\" }"
151- }
152- }
153- }
154- sampledRequestsEnabledForDefaultActions = true
155- captchaConfig = 500
156- challengeConfig = 500
157- tokenDomains = [" test.com" ]
158- }
159- }
33+ # module "fms02" {
34+ # source = "../..//"
35+ #
36+ # name = "fms02"
37+ # type = "WAFV2"
38+ # resource_type_list = ["AWS::ElasticLoadBalancingV2::LoadBalancer", "AWS::ApiGateway::Stage"]
39+ # include_map = {
40+ # "account" : ["111111111111"]
41+ # }
42+ # managed_service_data = {
43+ # "preProcessRuleGroups" : [
44+ # {
45+ # "ruleGroupType" : "ManagedRuleGroup",
46+ # "overrideAction" : { "type" : "NONE" },
47+ # "sampledRequestsEnabled" : true,
48+ # "ruleActionOverrides" : [
49+ # {
50+ # "name" : "AttributeCompromisedCredentials",
51+ # "actionToUse" : { "challenge" : {} }
52+ # },
53+ # {
54+ # "name" : "AttributeLongSession",
55+ # "actionToUse" : { "challenge" : {} }
56+ # },
57+ # {
58+ # "name" : "AttributePasswordTraversal",
59+ # "actionToUse" : { "challenge" : {} }
60+ # },
61+ # {
62+ # "name" : "AttributeUsernameTraversal",
63+ # "actionToUse" : { "challenge" : {} }
64+ # },
65+ # {
66+ # "name" : "SignalMissingCredential",
67+ # "actionToUse" : { "challenge" : {} }
68+ # },
69+ # {
70+ # "name" : "TokenRejected",
71+ # "actionToUse" : { "challenge" : {} }
72+ # },
73+ # {
74+ # "name" : "UnsupportedCognitoIDP",
75+ # "actionToUse" : { "challenge" : {} }
76+ # },
77+ # {
78+ # "name" : "VolumetricIpHigh",
79+ # "actionToUse" : { "challenge" : {} }
80+ # },
81+ # {
82+ # "name" : "VolumetricSession",
83+ # "actionToUse" : { "challenge" : {} }
84+ # }
85+ # ],
86+ # "managedRuleGroupIdentifier" : {
87+ # "managedRuleGroupName" : "AWSManagedRulesATPRuleSet",
88+ # "vendorName" : "AWS",
89+ # "versionEnabled" : true,
90+ # "version" : null,
91+ # "managedRuleGroupConfigs" : [
92+ # {
93+ # "awsmanagedRulesATPRuleSet" : {
94+ # "loginPath" : "/web/login",
95+ # "requestInspection" : {
96+ # "payloadType" : "JSON",
97+ # "usernameField" : { "identifier" : "/form/username" },
98+ # "passwordField" : { "identifier" : "/form/password" }
99+ # }
100+ # }
101+ # }
102+ # ]
103+ # }
104+ # }
105+ # ],
106+ # "postProcessRuleGroups" : [],
107+ # "defaultAction" : { "type" : "BLOCK" },
108+ # "customRequestHandling" : null,
109+ # "associationConfig" : null,
110+ # "tokenDomains" : ["test.com"],
111+ # "customResponse" : {
112+ # "enableCustomResponse" : true,
113+ # "customResponseBodyKey" : "fms",
114+ # "responseCode" : 403,
115+ # "responseHeaders" : [
116+ # {
117+ # "headerName" : "x-custom-response",
118+ # "headerValue" : "fms"
119+ # }
120+ # ],
121+ # "customResponseBodies" : {
122+ # "fms" : {
123+ # "responseBodyType" : "APPLICATION_JSON",
124+ # "responseBody" : "{\\'error\\': \\'accessDenied\\'}"
125+ # }
126+ # }
127+ # },
128+ # "type" : "WAFV2",
129+ # "overrideCustomerWebACLAssociation" : false,
130+ # "sampledRequestsEnabledForDefaultActions" : true,
131+ # "optimizeUnassociatedWebACL" : false,
132+ # "webACLSource" : "DEFAULT"
133+ # }
134+ # }
0 commit comments