Describe the feature
It would be great if we could get ARN of a CloudFront distribution L2 construct.
Use Case
easily get ARN of a distribution.
Proposed Solution
add IDistribution.distributionArn property. We already have a function to calculate it.
|
export function formatDistributionArn(dist: IDistribution) { |
|
return Stack.of(dist).formatArn({ |
|
service: 'cloudfront', |
|
region: '', |
|
resource: 'distribution', |
|
resourceName: dist.distributionId, |
|
}); |
|
} |
Other Information
No response
Acknowledgements
CDK version used
2.170.0
Environment details (OS name and version, etc.)
macOS
Describe the feature
It would be great if we could get ARN of a CloudFront distribution L2 construct.
Use Case
easily get ARN of a distribution.
Proposed Solution
add
IDistribution.distributionArnproperty. We already have a function to calculate it.aws-cdk/packages/aws-cdk-lib/aws-cloudfront/lib/private/utils.ts
Lines 7 to 14 in bf026bd
Other Information
No response
Acknowledgements
CDK version used
2.170.0
Environment details (OS name and version, etc.)
macOS