-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Description
This is a Bug Report
Repository to reproduce:
https://github.com/philiiiiiipp/sls-deploy-bug
Description
- What went wrong?
Running sls deploy with a serverless.yml containing a variable import inside the provider field silently stops. Setting the name to aws works fine.
serverless.yml:
service: sls-deploy-test
provider:
# This works fine
# name: aws
# This does not work
name: ${file(./serverless.values.yml):providerName}
runtime: nodejs8.10
region: eu-west-1
stage: dev
functions:
onlyDatHuisEmail:
handler: ./index.handler
memorySize: 128
timeout: 3
serverless.values.yml:
providerName: aws
Deploying with import:
$ npm run sls:deploy
> sls-test@1.0.0 sls:deploy /test-folder/sls-deploy
> SLS_DEBUG=true sls deploy
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Packaging service...
Serverless: Excluding development dependencies...
$
I have tried this with different versions of serverless dating back till 1.23.0, all with the same effect.
Running sls print gives the same correct output, with and without the import
$ sls print
service: sls-deploy-test
provider:
stage: dev
region: eu-west-1
name: aws
runtime: nodejs8.10
functions:
onlyDatHuisEmail:
handler: ./index.handler
memorySize: 128
timeout: 3
What did you expect should have happened?
It should deploy
Similar or dependent issues:
- Variables from external yml file not being referenced properly when writing to lambda environment #5272 Might be related
Additional Data
- Serverless Framework Version you're using: 1.30.3 ( tried it with various versions till 1.23.3 )
- Operating System: MacOS
- Stack Trace: -
- Provider Error messages: -