-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(cloudfront): trim autogenerated cache policy name #18953
Conversation
@RigoIce Thanks for figuring out the main cause given the generic cloudformation error. 👍 |
Hi @robertd. I just wanted to jump into a discussion about that PR. I already had a look into the code and found out that a fix just slicing the name would probably effect the appended region. Under some circumstances we could again have same names in different regions for the policies. The region suffix was introduced in #13737 closing #13629. I thought more about slicing the expression However, that seemed not to cover all facets for me as well because the hash could serve as a unique identifier within a region. I wasn't convinced whether my proposed slicing approach could cause problems with uniqueness in one region, i.e. multiple policies. So, this is the reason I haven't proposed a PR on my own as I see a possible solution with a backward compatible optional parameter for Maybe my considerations are too complicated or maybe the idea could also help in other cases where a shorter ID is required. Happy to discuss and support. |
@RigoIce Makes sense... Although, slicing the I'm not 100% sure what would be the best scenario here... slice uniqueId down to 110 characters and then append region? ... just to be on the safe side? @comcalvi Any thoughts? |
Thanks for chiming in @comcalvi. I’ll update the PR. |
@comcalvi ready for your review. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, this is great!
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Pull request has been modified.
@comcalvi I had to merge in the latest master because build failed for some weird reason. Please reapprove the PR again. TIA. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Closes aws#18918 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Closes #18918
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license