-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Describe the feature
Issue#21771 recently implemented an L2 construct solution for OAC, which is fantastic! However, for my use case it creates a cyclical dependency between our CloudFront Stack distribution Resource.Ref and a separate stack's bucket Resource.RegionalDomainName, where withOriginAccessIdentity does not.
Is it possible to allow buckets created outside of the CloudFront Distribution stack to work with the updated L2 as it does for the OAI implementation https://github.com/aws/aws-cdk/blob/v2.158.0/packages/aws-cdk-lib/aws-cloudfront-origins/lib/s3-bucket-origin.ts#L228?
I did double check that moving the bucket to the same stack resolved the cyclical dependency error, but that resolution will not work for our use case.
Use Case
Unfortunately I am unable to link my code source as its a private emu.
Bucket is created in Stack A
Distribution is created in Stack B referencing bucket from Stack A.
Use case currently works with S3Origin, as well as the updated S3BucketOrigin.withOriginAccessIdentity.
Proposed Solution
No response
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.158.0
Environment details (OS name and version, etc.)
Mac OS Sonoma 14.6.1