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

feat(cloudfront): support gRPC for distribution #32535

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/aws-cdk-lib/aws-cloudfront/lib/distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,14 @@ export interface AddBehaviorOptions {
* @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html
*/
readonly trustedKeyGroups?: IKeyGroup[];

/**
* Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins.
*
* @default false
* @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-using-grpc.html
*/
readonly enableGrpc?: boolean;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export class CacheBehavior {
cachedMethods: this.props.cachedMethods?.methods,
cachePolicyId: (this.props.cachePolicy ?? CachePolicy.CACHING_OPTIMIZED).cachePolicyId,
compress: this.props.compress ?? true,
grpcConfig: {
enabled: this.props.enableGrpc,
},
originRequestPolicyId: this.props.originRequestPolicy?.originRequestPolicyId,
realtimeLogConfigArn: this.props?.realtimeLogConfig?.realtimeLogConfigArn,
responseHeadersPolicyId: this.props.responseHeadersPolicy?.responseHeadersPolicyId,
Expand Down
Loading