Closed vobarian closed 4 days ago
Hi @vobarian , thanks for reaching out.
Yes, it would be good to provide custom origin id in the origingroup.
This is cdk Code which implements OriginGroup https://github.com/aws/aws-cdk/blob/4b8714d7b499362f0b77ad9a615479227e339078/packages/aws-cdk-lib/aws-cloudfront-origins/lib/origin-group.ts#L31
and this is OriginGroupProps code reference - https://github.com/aws/aws-cdk/blob/4b8714d7b499362f0b77ad9a615479227e339078/packages/aws-cdk-lib/aws-cloudfront-origins/lib/origin-group.ts#L5
Let me know if you need any more information. Thanks for volunteering for contribution!
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Describe the feature
OriginGroup does not appear to support setting an explicit originId currently. The auto-generated ID is very long and hard to read. We would like to set the originId as with other origin types such as HttpOrigin or RestApiOrigin.
Use Case
Create easy to read origin IDs for Origin Groups so we can more easily understand the configuration when looking at it in the CloudFront console.
Proposed Solution
Add originId to OriginGroupProps.
I might be able to implement this; I'm not very familiar with CDK internals but it seems that wherever the auto-generated ID is created, it could instead use the explicit prop if set. I could use a little hint on where this happens.
Other Information
No response
Acknowledgements
CDK version used
2.158.0
Environment details (OS name and version, etc.)
macOS