Skip to content

Specify config filename in one place #32

@jiscsander

Description

@jiscsander

Hi, first of all many thanks for developing and open sourcing this! It is much appreciated and we thought we could maybe give something back by helping improve it.

We got caught out by the config specifying odin.yml in two separate places today after noticing it had nuked our UAT stages when we had configured it to not.

The custom variable under odin: ${file(./odin.yml)} suggested to us that we can make a odin-custom.yml file and plug it in serverless.yml, and the configuration from it would be used everywhere. However, odin.yml is also hardcoded into odin-config-loader.js as const odinConfig = safeLoad(readFileSync('odin.yml', 'utf8'));. This meant half of the config came from our odin-custom.yml, and the other half from the default odin.yml

Suggest pulling the config filename from a single source, with the filename defaulting to odin.yml if not specified. Maybe in serverless.env.yml?

We're happy to do a PR if you think it's a good idea.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions