Skip to content

Commit

Permalink
fix(aws-cloudfront): expose distributionId (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr authored Oct 16, 2018
1 parent b743362 commit f58d98c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/@aws-cdk/aws-cloudfront/lib/web_distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,11 @@ export class CloudFrontWebDistribution extends cdk.Construct {
*/
public readonly domainName: string;

/**
* The distribution ID for this distribution.
*/
public readonly distributionId: string;

/**
* Maps our methods to the string arrays they are
*/
Expand Down Expand Up @@ -644,7 +649,7 @@ export class CloudFrontWebDistribution extends cdk.Construct {

const distribution = new cloudformation.DistributionResource(this, 'CFDistribution', {distributionConfig});
this.domainName = distribution.distributionDomainName;

this.distributionId = distribution.distributionId;
}

private toBehavior(input: BehaviorWithOrigin, protoPolicy?: ViewerProtocolPolicy) {
Expand Down

0 comments on commit f58d98c

Please sign in to comment.