Skip to content

schema validations for environment variables fail #8285

Description

@dazza-codes

For serverless 2.x, the schema validation fails for environment variables

With serverless.yaml that contains environment variables, e.g.

provider:
  environment:
    FLASK_ENV: development

functions:
  funcName:
    environment:
      ANY_ENV: avalue

The errors are like:

Serverless:   at 'functions.funcName.environment.ANY_ENV': unsupported configuration format
Serverless:   at 'provider.environment.FLASK_ENV': unsupported configuration format
serverless.yml
provider:
  environment:
    FLASK_ENV: development

functions:
  funcName:
    environment:
      ANY_ENV: avalue
sls package output
Serverless:   at 'functions.funcName.environment.ANY_ENV': unsupported configuration format
Serverless:   at 'provider.environment.FLASK_DEBUG': unsupported configuration format
Serverless:   at 'provider.environment.DATADOG_ENABLED': unsupported configuration format

Installed version

Framework Core: 2.2.0
Plugin: 4.0.4
SDK: 2.3.2
Components: 3.1.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions