Hey guys, I want to use the wafV2 package but the configuration seems to be off... when implementi...
s
Hey guys, I want to use the wafV2 package but the configuration seems to be off... when implementing the
visibilityConfig: pulumi.Input<aws.types.input.wafv2.WebAclRuleVisibilityConfig>
as
Copy code
visibilityConfig: {
                cloudWatchMetricsEnabled: true,
                metricName: 'DefaultRateLimit',
                sampledRequestsEnabled: true,
              },
Which is strange because the source provides the following exported interface:
Copy code
export interface wafv2.WebAclRuleVisibilityConfig {     
                           cloudwatchMetricsEnabled: pulumi.Input<boolean>     
                           metricName: pulumi.Input<string>     
                           sampledRequestsEnabled: pulumi.Input<boolean> 
                    }
I see the error ->
Copy code
Object literal may only specify known properties, and cloudWatchMetricsEnabled does not exist in type Input<WebAclRuleVisibilityConfig>
Also while referring to the AWS documentation, It supports my current implementation: https://docs.aws.amazon.com/waf/latest/APIReference/API_VisibilityConfig.html
m
It's
cloudwatch
not
cloudWatch
🙌 1
f
can you try
cloudwatchMetricsEnabled
with w lowercase? maybe that's it
👆 1
🙌 1
f
ha kilian beat me to it 😄
😅 1
m
For some reason, it's missing in the docs: https://www.pulumi.com/registry/packages/aws/api-docs/wafv2/webacl/#webaclrulevisibilityconfig is used as an anchor link but leads to nowhere
s
That was it 🤦‍♂️ thank you for that!! Yeah, I still was confused as it wasnt in the documentation. Just a typo though thank you!
f
hmmm yeah, that's not right; it should be in the docs
m
I tried to see if there was a change recently, but the types file is so large that GitHub doesn't render it and it's not possible to browse the history
f
oho:
Note: There are over 200 nested types for this resource. Only the first 200 types are included in this documentation.
😱 1
it's a big'un
now, i dunno why exactly 😆
m
Looks like the entirety of the product is exposed as one a few giant resources 😉
😮 1
l
They say, Security is Hard. Apparently, laying out Security configuration files is Hard, too.