Skip to content

Commit

Permalink
propagate originAccessControlId CloudFront Origin property to Cloud…
Browse files Browse the repository at this point in the history
…Formation templates

fixes #32018
  • Loading branch information
ivanbarlog committed Nov 7, 2024
1 parent 74c0ac9 commit edaa470
Showing 1 changed file with 3 additions and 0 deletions.
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 edaa470

Please sign in to comment.