Skip to content
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 array of ${file(..)} for provider and custom config #6677

Closed
mikestopcontinues opened this issue Sep 12, 2019 · 2 comments
Closed

Allow array of ${file(..)} for provider and custom config #6677

mikestopcontinues opened this issue Sep 12, 2019 · 2 comments

Comments

@mikestopcontinues
Copy link

mikestopcontinues commented Sep 12, 2019

This is a Feature Proposal

Description

We can already merge config objects for resources and functions fields, but provider and custom can prove just as unwieldy. We should have an easy way to reuse and merge config for this field.

My particular use case is very basic. I share a lot of boilerplate config between services, and I just want to be able to add or overwrite a handful of options between them.

@mikestopcontinues mikestopcontinues changed the title Allow array of ${file(..)} for provider config Allow array of ${file(..)} for provider and custom config Sep 12, 2019
@gdraynz
Copy link
Contributor

gdraynz commented Oct 1, 2019

I stumbled upon this issue as well when trying to split things from my serverless.yml file, just like this:

service: testing

provider:
  name: aws
  runtime: python3.7

layers:
  - ${file(myfile.yml):layers}

functions:
  - ${file(myfile.yml):functions}
functions:
  myfunction:
    handler: myfunction.handler
    layers: { Ref: MyRequirementsLambdaLayer }

layers:
  myRequirements:
    path: requirements

This example will work just fine for functions, but not for the layers:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined

@medikoo
Copy link
Contributor

medikoo commented Apr 12, 2021

Closing as duplicate of #8037

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

No branches or pull requests

4 participants