Skip to content

Unable to refer variable from other yml file in serverless.yml,deployment fails #5828

Closed

Description

@sunkhanna

I am trying to refer a variable in serverless.yml from another yml file,but when I run serverless deploy it does nothing.

**Serverless.yml

provider:
name: ${file(./constants.yml):name}
runtime: ${file(./constants.yml):runtime}
region: ${file(./constants.yml):region}**

I have refereed variable in provider.

constants .yml is in same folder as serverless.

D:\code\structuringserverless\serverless_sftp_workingcode>sls deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...

It does nothing after these two steps and just terminates without any error info.

Activity

  1. changed the title [-]Unable to reference variable from other yml file in serverless.yml,deployment fails[/-] [+]Unable to refer variable from other yml file in serverless.yml,deployment fails[/+] on Feb 13, 2019
  2. pmuens commented on Feb 13, 2019

    @pmuens
    Contributor

    Hey @sunkhanna thanks for opening 👍

    What version of serverless are you using?

  3. blissboy commented on Feb 13, 2019

    @blissboy

    I am seeing similar behavior in 1.37.1, posted example in help slack channel.

  4. sunkhanna commented on Feb 14, 2019

    @sunkhanna
    Author

    I am using 1.36.3....and I realised I am able to refer to other files but when I am adding the reference in provider I am not able to refer and it abruptly terminates as above.

    But I want it to refer in provider as well,whats wrong with that... :(

  5. medikoo commented on Mar 3, 2021

    @medikoo
    Contributor

    Fixed with #8987

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions