-
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(rds): fix unresolved endpoint socket address #2846
Conversation
This actually looks like something I'd like tokens to be able to do. @rix0rrr what do you think? const num = Token.asNumber({ "Fn::GetAtt": [ "Boom", "Port" ] });
const text = `Hello, ${num}`; Should resolve to: { "Fn::Join": [ "", [ "Hello, ", { "Fn::GetAtt": [ "Boom", "Port" ] } ] ] } I think?? |
Convert port to a string token before using it in `socketAddress` otherwise the number token is converted to a string and cannot be resolved. Fixes aws#2711
@eladb found a "nicer" fix in the mean time, see latest commit. Agree that it would be nice if this would be handled by the token system. As the fix here implies, wouldn't this need something like a |
Elad, so you're saying we should also be scanning strings for stringified versions of number-encoded tokens? I mean, technically possible, but pretty tricky I'm expecting. (Also, purity nitpick: to properly mirror the language type system into the document type system, we would then need to produce a stringified version of the number in the CloudFormation document language as well, which we can't. Good thing is that CFN probably doesn't care about the distinction all that much...) |
Convert
port
to a string token before using it insocketAddress
otherwise the number token isconverted to a string and cannot be resolved.
Fixes #2711
Pull Request Checklist
design
folderBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.