-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(cloudfront): find and replace text in the code of CloudFront Functions during synth #30621
base: main
Are you sure you want to change the base?
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
121fba1
to
817da40
Compare
In the last PR Linter / validate-pr, node core dumped from a bus error. The prior validate-pr had succeeded.
|
817da40
to
0e7e8f3
Compare
64606b6
to
e19ed62
Compare
e19ed62
to
66c0d03
Compare
66c0d03
to
4d5016a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #30621 +/- ##
=======================================
Coverage 81.52% 81.52%
=======================================
Files 222 222
Lines 13715 13715
Branches 2417 2417
=======================================
Hits 11181 11181
Misses 2254 2254
Partials 280 280
Flags with carried forward coverage won't be shown. Click here to find out more.
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
/** | ||
* The text to replace the find text with. | ||
*/ | ||
readonly replace: string | Token; |
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.
Be careful here - deploy-time tokens will not be resolved with this, will they?
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.
I think they do. In the case of KVS ID, it's not known until the KVS is deployed. So I'm thinking it must be Token.
Issue # (if applicable)
Closes #30492
Reason for this change
Primarily to allow deploying a CloudFront Function and its Key/Value Store in the same stack, without having to deploy the Key/Value Store first, manually retrieve its ID, and then hardcode the ID into the Function's code.Secondarily to allow other values in a CloudFront Function's code to be changed when deploying into different environments, dev verses prod for example.
Description of changes
Backwards compatible API changes
Description of how you validated changes
describe('find/replace in function code'…
to function.test.ts.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license