abundant-appointment-96790
09/20/2020, 6:36 PMWAFInvalidParameterException: Error reason: Your statement has multiple values set for a field that requires exactly one value., field: RULE, parameter: Rule
Here’s my code:
const exampleWebAcl = new aws.wafv2.WebAcl("exampleWebAcl", {
scope: "REGIONAL",
defaultAction: {
allow: {},
},
visibilityConfig: {
cloudwatchMetricsEnabled: true,
metricName: `${stackEnv}-waf-metric`,
sampledRequestsEnabled: true,
},
rules: [
{
name: "metric-based",
priority: 0,
statement: {
rateBasedStatement: {
aggregateKeyType: "IP",
limit: 100,
}
},
visibilityConfig: {
cloudwatchMetricsEnabled: true,
metricName: `${stackEnv}-waf-rate`,
sampledRequestsEnabled: true,
}
}
]
});
const exampleWebAclAssociation = new aws.wafv2.WebAclAssociation("exampleWebAclAssociation", {
resourceArn: loadBalancer.loadBalancer.arn,
webAclArn: exampleWebAcl.arn,
});
Any idea?strong-plastic-28250
09/20/2020, 8:17 PMabundant-appointment-96790
09/20/2020, 9:10 PMrules?: pulumi.Input<pulumi.Input<inputs.wafv2.WebAclRule>[]>
gentle-diamond-70147
09/21/2020, 3:26 PMaction
or overrideAction
for your rule. Unfortunately it seems this is a poor error message from AWS.abundant-appointment-96790
09/21/2020, 4:49 PM