-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
(ec2): 2.31.0 breaks deployments to vpcflow logs that don't specify optional DestinationOptions #21037
Comments
I can reproduce this on a python project, but not in a typescript project. I'm not sure why python is handling this differently. @rix0rrr @RomainMuller any ideas? |
I am also finding the same behavior here - and can confirm that this isn't seen on Python CDK version 2.30.0 |
It was introduced in #20765 |
…1042) PR #20765 introduced destinationOptions, but only introduced one of the optional properties ('hiveCompatiblePartitions') since that is the only property that was relevant for the PR. The [docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-flowlog.html#cfn-ec2-flowlog-destinationoptions) don't specify this, but if you provide `destinationOptions` you must specify a value for each prop, otherwise you will receive an error message on deploy. This PR adds the two additional properties. re #21037 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This is because
As far as Python is concerned, this terminal position property bag is a set of keyword arguments, and there is no way to explicitly pass The issue actually is that this place assumes no |
I think this might be fixed in #21042 since I am explicitly setting |
…s#21042) PR aws#20765 introduced destinationOptions, but only introduced one of the optional properties ('hiveCompatiblePartitions') since that is the only property that was relevant for the PR. The [docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-flowlog.html#cfn-ec2-flowlog-destinationoptions) don't specify this, but if you provide `destinationOptions` you must specify a value for each prop, otherwise you will receive an error message on deploy. This PR adds the two additional properties. re aws#21037 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Update to 2.33.0 is the cure... |
|
Describe the bug
After CDK 2.31.0
aws_cdk.aws_ec2.FlowLogOptions
synthesize with a new parameterDestinationOptions
regardless of whether or not that parameter is defined in CDK code.For example, you can implement
aws_cdk.aws_ec2.FlowLogDestination.to_s3
without specifying destination options, resulting in a synthesized value ofDestinationOptions
set to{}
.This appears valid at first, an a CDK diff:
But then fails CFN validation during deployment:
Looking at the CFN User Guide,
DestinationOptions
is not required, but apparently if specified, all three keys become required.Expected Behavior
I expect the
ec2.Vpc.add_flow_log
method to synthesize without an emptyDestinationOptions
parameter.e.g. this CDK python code:
should synthesize as such:
Current Behavior
Current behavior is
ec2.Vpc.add_flow_log
method synthesizes with an emptyDestinationOptions
parameter.e.g. this CDK python code:
synthesizes as invalid CFN:
Reproduction Steps
See "Expected Behavior"
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.31.0
Framework Version
No response
Node.js Version
16.15.1
OS
macOS 12.4
Language
Python
Language Version
Python 3.10.5
Other information
No response
The text was updated successfully, but these errors were encountered: