Skip to content

Error setting a variable to an enum attribute #995

Open
@hallelk

Description

Describe the bug

Working on a serverless project in vscode, I came across this problem -
Trying to set a variable to an attribute defined as an enum - i get "value is not accepted. valid values: ...".

See this simplified version:

service: test-service

provider:
  name: aws
  region: ${env:AWS_REGION} # this value gets an error

Expected Behavior

I'd expect it to be a warning or less.

Current Behavior

I get an error reported.

Steps to Reproduce

Just put this example in a file called serverless.yml and open with vscode, then wait a bit for the linting to happen.
Adding useDotenv: true or using the serverless-dotenv-plugin doesn't change this.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

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