`env_var_name` is not supported in pipeline parameters

Right now when passing pipeline parameter type as env_var_name getting below error:

ERROR IN CONFIG FILE:
[#/parameters/parameter_name/type] only 1 subschema matches out of 2

  1. [#/parameters/parameter_name/type] Input not a valid enum value
    | enum:
    | - boolean

So this is creating an issue when we are passing any pipeline parameter to orbs which except env_var_name as input.

For example, if we create a pipeline parameter as AWS_REGION_ENV_KEY & set its default value as "" (empty string), then

  1. vscode circle extension will show errors like

Parameter aws-region for aws-cli/setup must be a env_var_name

  1. I have to change the default value to something like AWS_REGION to make it work.

Is there any reason for not supporting env_var_name as a type for pipeline parameters? Or is this in WIP?

Have you tried defining an environment variable in the job that is assigned the value of the pipeline parameter?

The following is a simple example that shows the value of pipeline.number being assigned to the environment variable PIPELINE_NUMBER. The example then shows this environment variable being accessed from within a shell.

version: 2.1

executors:
  hosted_node:
    machine:
      image: ubuntu-2004:current
    resource_class: medium
    
jobs:
  build:
    executor: hosted_node
    shell: /bin/bash --login -eo pipefail
    environment:
       PIPELINE_NUMBER: << pipeline.number >>
    steps:
      - run:
          name: show pipeline number
          command: |
                   echo “pipeline.number: <<pipeline.number>>”
                   echo “pipeline.number: $PIPELINE_NUMBER”
        
workflows:
  process:
    jobs:
     - build