-
Notifications
You must be signed in to change notification settings - Fork 820
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: parse nested yaml GetAtt refs correctly #7220
Conversation
}; | ||
} | ||
// data is a string | ||
const firstPeriodIdx = data.indexOf('.'); |
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.
If there is no .
in the string, this will generate the wrong output. I'm not sure if it actually matters though since the GetAtt
won't work properly.
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.
yeah I don't think we need to cover that case here as it's already invalid
a328540
to
ff514ac
Compare
Codecov Report
@@ Coverage Diff @@
## master #7220 +/- ##
==========================================
- Coverage 52.28% 52.27% -0.02%
==========================================
Files 491 491
Lines 25242 25248 +6
Branches 4952 4952
==========================================
Hits 13199 13199
- Misses 11091 11097 +6
Partials 952 952
Continue to review full report at Codecov.
|
👋 Hi, this issue was referenced in the v4.50.2 release! Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v4.50.2. |
Description of changes
Per the CFN spec: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html, the logic for reading YAML templates had a bug where
!GetAtt myResource.output.propName
would be translated into
instead of
Issue #, if available
Description of how you validated changes
Unit tested
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.