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

Feature Request: Defaults in serverless.yaml #1487

Closed
danhumphrey opened this issue Jul 5, 2016 · 5 comments
Closed

Feature Request: Defaults in serverless.yaml #1487

danhumphrey opened this issue Jul 5, 2016 · 5 comments
Milestone

Comments

@danhumphrey
Copy link

danhumphrey commented Jul 5, 2016

When creating a new service, I would like to see the defaults in the serverless.yaml file. I think this avoids ambiguity. The defaults can be edited or removed, but I think the visibility helps with understanding.

If I'm not following protocol in raising this, please correct me..

service: first-service
provider: aws
functions:
    hello:
        handler: handler.hello
defaults:
  stage: "dev"
  region: "us-east-1"
  memory: 1024
  timeout: 6
@pmuens
Copy link
Contributor

pmuens commented Jul 5, 2016

Good point.
We're planning to add commented out versions of this in the generated serverless.yaml file (see #1374).

/cc @eahefnawy

@pmuens pmuens added this to the v1.0 milestone Jul 5, 2016
@eahefnawy
Copy link
Member

@danhumphrey hmmm we used to do that, but we thought it's best if we follow "convention over configuration". Just keeping the config file as minimal as possible and include only essential data and keep the rest as overwrite-able defaults. but just like @pmuens mentioned, we may put in commented config just for the sake of demonstration.

@danhumphrey
Copy link
Author

@eahefnawy @pmuens convention over configuration is good assuming that the default config works for the majority of users. Is it an accurate assumption that the majority of users will want to use the same region? or am I misunderstanding this?

Commented config sounds good, but #1374 is closed. Is this still under consideration.

@pmuens
Copy link
Contributor

pmuens commented Jul 7, 2016

@danhumphrey It's closed but we're about to implement this in v1 (in a future release).

@pmuens
Copy link
Contributor

pmuens commented Aug 17, 2016

A commented out section in the serverless.yml file was added which outlines what one can configure.

The defaults section will be deprecated soon as the new variable system (see #1834) will make configuring things easer.

@pmuens pmuens closed this as completed Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants