Skip to content

Commit

Permalink
fix(cloudfront origin): propagate originAccessControlId origin valu…
Browse files Browse the repository at this point in the history
…e to cloudfront templates

fixes #32018
  • Loading branch information
ivanbarlog committed Nov 5, 2024
1 parent 090c7be commit 05107e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ The @aws-cdk/cli-lib-alpha package includes the following third-party software/l

----------------

** @jsii/check-node@1.103.1 - https://www.npmjs.com/package/@jsii/check-node/v/1.103.1 | Apache-2.0
** @jsii/check-node@1.104.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.104.0 | Apache-2.0
jsii
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Expand Down Expand Up @@ -3562,7 +3562,7 @@ THE SOFTWARE.

----------------

** tslib@2.7.0 - https://www.npmjs.com/package/tslib/v/2.7.0 | 0BSD
** tslib@2.8.0 - https://www.npmjs.com/package/tslib/v/2.8.0 | 0BSD
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-lib/aws-cloudfront/lib/origin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export abstract class OriginBase implements IOrigin {
private readonly originShieldRegion?: string;
private readonly originShieldEnabled: boolean;
private readonly originId?: string;
private readonly originAccessControlId?: string;

protected constructor(domainName: string, props: OriginProps = {}) {
validateIntInRangeOrUndefined('connectionTimeout', 1, 10, props.connectionTimeout?.toSeconds());
Expand All @@ -163,6 +164,7 @@ export abstract class OriginBase implements IOrigin {
this.originShieldRegion = props.originShieldRegion;
this.originId = props.originId;
this.originShieldEnabled = props.originShieldEnabled ?? true;
this.originAccessControlId = props.originAccessControlId;
}

/**
Expand All @@ -187,6 +189,7 @@ export abstract class OriginBase implements IOrigin {
s3OriginConfig,
customOriginConfig,
originShield: this.renderOriginShield(this.originShieldEnabled, this.originShieldRegion),
originAccessControlId: this.originAccessControlId,
},
};
}
Expand Down

0 comments on commit 05107e7

Please sign in to comment.