Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudfront: expose ARN for Distribution #32530

Open
2 tasks
tmokmss opened this issue Dec 15, 2024 · 0 comments · May be fixed by #32531
Open
2 tasks

cloudfront: expose ARN for Distribution #32530

tmokmss opened this issue Dec 15, 2024 · 0 comments · May be fixed by #32531
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@tmokmss
Copy link
Contributor

tmokmss commented Dec 15, 2024

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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.170.0

Environment details (OS name and version, etc.)

macOS

@tmokmss tmokmss added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 15, 2024
@github-actions github-actions bot added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label Dec 15, 2024
@nmussy nmussy linked a pull request Dec 15, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant