-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws-cloudfront: cache policy comment length is not validated #31248
Comments
Reproducible using latest version of CDK ( Running Resources:
MyCachePolicyAB35B4E5:
Type: AWS::CloudFront::CachePolicy
Properties:
CachePolicyConfig:
Comment: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DefaultTTL: 86400
MaxTTL: 31536000
MinTTL: 0
Name: CdktestStackMyCachePolicy7DA6ED29-us-east-2
ParametersInCacheKeyAndForwardedToOrigin:
CookiesConfig:
CookieBehavior: none
EnableAcceptEncodingBrotli: false
EnableAcceptEncodingGzip: false
HeadersConfig:
HeaderBehavior: none
QueryStringsConfig:
QueryStringBehavior: none
Metadata:
aws:cdk:path: CdktestStack/MyCachePolicy/Resource
CDKMetadata:
Type: AWS::CDK::Metadata
Properties:
Analytics: v2:deflate64:H4sIAAAAAAAA/zPSMzQ10TNUTCwv1k1OydbNyUzSqw4uSUzO1gEKxSfn5JempBXl55XoVTsnJmekBuTnZCZX6jin5SFxa0H8oNTi/NKi5NRanbz8lFS9rGL9MiMjPXM9A8Ws4sxM3aLSvJLM3FS9IAgNAIOR5994AAAA
Metadata:
aws:cdk:path: CdktestStack/CDKMetadata/Default
Parameters:
BootstrapVersion:
Type: AWS::SSM::Parameter::Value<String>
Default: /cdk-bootstrap/hnb659fds/version
Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip] Running
Per AWS CloudFront > CreateCachePolicy, comment cannot be longer than 128 characters. @floriangosse Thanks for your PR contribution. |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
…cy (aws#31251) ### Issue # (if applicable) Closes aws#31248 . ### Reason for this change CDK doesn't validate the comment's length in the cache policy now. ### Description of changes Add validation for the length. ### Description of how you validated changes unit tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
CloudFront cache policy have a maximum comment length of 128 but is currently not validated by CDK.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
CDK validates the comment's length.
Current Behavior
CDK doesn't validate the comment's length.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.37.1
Framework Version
No response
Node.js Version
20
OS
macOS
Language
TypeScript
Language Version
TypeScript 5
Other information
No response
The text was updated successfully, but these errors were encountered: