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
Allow to escape variables format #8116
Comments
@0ptional thanks for report. Can you respect all bug template remarks, and point at which exactly point you observe ENV_VAR1 not resolved as expected? |
@medikoo Sorry! I updated the report with full serverless.yml and output for serverless-stage.json file. |
@optional thanks for update. It's caused by |
@medikoo Yes, I need it because it otherwise conflicts with Variable Syntax of CloudFormation:
If I run it without setting |
Problem is that internally variable resolution engine uses temporary Anyway it feels to me that real problem is collision of our syntax with format you use in CloudFormation template. I wonder how to tackle that in best way. We probably should support escaping such case, so "\${StepFunctionArn}" will not invoke variable resolver but just strip leading slash. Let me keep this issue open as reference to that specific problem |
@medikoo Ah, perfect. That solved my problem. Thank you! variableSyntax: "\\${((env|self|opt|file|cf|s3|deep)[:\\(][ :a-zA-Z0-9._,\\-\\/\\(\\)]*?)}" |
Closing in favor of #3184, which is about same thing and has already involved discussion |
Duplicate of #3184 |
Source of a reported issue was that
"${StepFunctionArn}"
in CF template was attempted to be resolved by our variable resolver, when it was unexpected.Proposed solution:
We probably should support escaping such case, so "${StepFunctionArn}" will not invoke variable resolver but just strip leading slash.
Original report:
Using custom variableSyntax, serverless can't resolve variable value if it contains another variable:
serverless.yml
sls package
.serverless/serverless-stage.jsonCustom variable
bucketName
gets correctly resolved tomytest-bucket-dev
. But environment variable inprovider
gets resolved to${deep:0}
. Seeserverless-stage.json
:Installed version
The text was updated successfully, but these errors were encountered: