Can't concatenate in serverless.yml
See original GitHub issueI’m currently migrating from the plugin to the component.
In my existing serverless.yml I am able to do this sort of thing:
domainName: ${env:STAGE}-front-end.mydomain.com
But in the component if I do this
ph-front-end:
component: '@sls-next/serverless-component@1.16.0-alpha.1'
inputs:
domain:
- ${env.STAGE}-front-end
- mydomain.com
Then it doesn’t seem to concatenate.
Also with the lambda names:
name:
defaultLambda: ${env.STAGE}-front-end
apiLambda: ${env.STAGE}-front-end-api
In that case I just get the STAGE variable without the -front-end
added on.
If the syntax works in the old serverless.yml I’m surprised it doesn’t work in the new serverless.yml.
Am I doing something wrong? I don’t want to have to send ${SUBDOMAIN}
, ${LAMBDA_NAME}, ${API_LAMBDA_NAME}
, etc. when they’re all just derivations off of ${STAGE}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to concatenate env variable to string in YAML file
I have a serverless.yaml file and I ...
Read more >Variables - Serverless Framework
Variables. Variables allow users to dynamically replace config values in serverless.yml config. They are especially useful when providing secrets for your ...
Read more >AWS Lambda Guide - Serverless.yml Reference
Here is a list of all available properties in serverless.yml when the provider is set to aws . ... Fn::Join: ... Cannot be...
Read more >Introducing multi-service deployments via Serverless ...
We are excited to announce Serverless Framework Compose: a new feature enabling you to deploy multiple services in one command, in parallel, ...
Read more >AWS Lambda Functions - Serverless Framework
... service can be found in serverless.yml under the functions property. ... Fn::Join: ... buildArgs , cacheFrom , and platform cannot be defined....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have no explanation for this, but the trick is to set
stage
as a veriable in the component and then reference that. Referencing the environment variable directly seems to just overwrite everything.Working configuration
That doesn’t work either. So frustrating.
Then running
I get a domain of
https://dev.mydomain.com
rather than what I’d expect to behttps://dev-front-end.mydomain.com