Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wafv2.CfnLoggingConfiguration.LoggingFilterProperty and wafv2.CfnLoggingConfiguration.FilterProperty create CF code with wrong keys #27404

Closed
D592 opened this issue Oct 4, 2023 · 2 comments
Labels
@aws-cdk/aws-wafv2 duplicate This issue is a duplicate.

Comments

@D592
Copy link

D592 commented Oct 4, 2023

Describe the bug

logging_filter=wafv2.CfnLoggingConfiguration.LoggingFilterProperty(
default_behavior="DROP",
filters=[wafv2.CfnLoggingConfiguration.FilterProperty(
behavior="KEEP",
conditions=[wafv2.CfnLoggingConfiguration.ConditionProperty(
action_condition=wafv2.CfnLoggingConfiguration.ActionConditionProperty(action="BLOCK")
)],
requirement="MEETS_ALL"
)]
)
creates CF stack with incorrect keys (started with a lowercase letter - should be from capital)
LoggingFilter:
defaultBehavior: DROP
filters:
- behavior: KEEP
conditions:
- actionCondition:
action: BLOCK
requirement: MEETS_ALL

Expected Behavior

  LoggingFilter:
    DefaultBehavior: DROP
    Filters:
      - Behavior: KEEP
        Conditions:
          - ActionCondition:
              Action: BLOCK
        Requirement: MEETS_ALL

Current Behavior

  LoggingFilter:
    defaultBehavior: DROP
    filters:
      - behavior: KEEP
        conditions:
          - actionCondition:
              action: BLOCK
        requirement: MEETS_ALL

the keys are incorrect and deploy is broken

Reproduction Steps

code in the "Describe the bug" section
synth - OK
deploy - error - AWS CF return "wrong Key"

Possible Solution

update the wafv2.CfnLoggingConfiguration.LoggingFilterProperty and wafv2.CfnLoggingConfiguration.FilterProperty

Additional Information/Context

No response

CDK CLI Version

2.99.0

Framework Version

No response

Node.js Version

18.18.0

OS

Linux Ubuntu 22.04

Language

Python

Language Version

3.10

Other information

No response

@D592 D592 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 4, 2023
@peterwoodworth peterwoodworth added duplicate This issue is a duplicate. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 4, 2023
@peterwoodworth
Copy link
Contributor

Hey, thanks for reporting. Please see this issue, in short you don't want to use the specific property types where the API is not expecting those types.

@peterwoodworth peterwoodworth closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-wafv2 duplicate This issue is a duplicate.
Projects
None yet
Development

No branches or pull requests

2 participants