Skip to content

Commented lines in yaml get parsed and error out if undeclared environment variable is present #1757

@harshadixit12

Description

@harshadixit12

In the below config, the line containing environment variable DECK_CLIENT_ID is commented out, but running deck gateway diff config.yaml errors out with

Error: 1 errors occurred:
        reading file comment.yaml: parsing file: template: state:13:23: executing "state" at <env "DECK_CLIENT_ID">: error calling env: environment variable 'DECK_CLIENT_ID' present in state file but not set

Config:

_format_version: "3.0"
_konnect:
  control_plane_name: ${{ env "DECK_CONTROL_PLANE_NAME" }}
_info:
  select_tags:
    - my-tags
plugins:
- name: correlation-id
  instance_name: my-plugin-name
  config:
    header_name: x-header-name
    generator: uuid
#       client_id: ${{ env "DECK_CLIENT_ID"}}

https://kongstrong.slack.com/archives/C04349E4KRC/p1757955833229939

Metadata

Metadata

Assignees

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