lively-mouse-65447
12/02/2024, 4:23 PM'WebAcl' has a problem: Invalid or unknown key. Examine values at 'WebAcl.rules'.
I found out it's caused by this rule:
const cognitoRule = {
name: 'CognitoSignInRateLimit',
priority: 2,
action: { ... },
visibilityConfig: { ... },
statement: {
rateBasedStatement: {
...
scopeDownStatement: {
andStatement: {
statements: [
{..}
{
notStatement: {
statements: [
{
orStatement: {
statements: [
{ ... },
{ ... }
]
}
}
]
}
}
]
}
}
}
}
} satisfies aws.types.input.wafv2.WebAclRule
When I change it like this:
const cognitoRule = {
name: 'CognitoSignInRateLimit',
priority: 2,
action: { ... },
visibilityConfig: { ... },
statement: {
rateBasedStatement: {
...
scopeDownStatement: {
andStatement: {
statements: [
{..}
{
notStatement: {
statements: [ {} ] // 👈 Changed here
}
}
]
}
}
}
}
} satisfies aws.types.input.wafv2.WebAclRule
Then the error disappears.
Any clue? Is it some bug in Pulumi/Terraform? Because the code seems to be valid both according to TypeScript types and AWS docs.enough-garden-22763
12/02/2024, 4:57 PMenough-garden-22763
12/02/2024, 4:57 PMInvalid or unknown key. Examine values at 'WebAcl.rules'.
enough-garden-22763
12/02/2024, 4:57 PMlively-mouse-65447
12/02/2024, 5:18 PMlively-mouse-65447
12/02/2024, 7:51 PM