Skip to content

Commit

Permalink
TF-1072: assign distribution as class property
Browse files Browse the repository at this point in the history
  • Loading branch information
gowrizrh committed Oct 23, 2023
1 parent 606951e commit c4c3a8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/static-hosting/lib/static-hosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@ export class StaticHosting extends Construct {
errorResponses: props.enableErrorConfig ? errorResponses : [],
};

const distribution = new Distribution(this, "BucketCdn", distributionProps);
this.distribution = new Distribution(this, "BucketCdn", distributionProps);

if (props.overrideLogicalId) {
const cfnDistribution = distribution.node.defaultChild as CfnDistribution;
const cfnDistribution = this.distribution.node.defaultChild as CfnDistribution;
cfnDistribution.overrideLogicalId(props.overrideLogicalId);
}

Expand Down

0 comments on commit c4c3a8b

Please sign in to comment.