CircleCi mapping example

Somehow I feel this should be very simple, and I cannot seem to find a way to do it with the cirleci config.
I have a simple task—take one value and map it to another based on a predefined map.
Something like this:


YAML allows me to define this without problems. My issue is I cannot figure out how to use it in circleci config:

    executor: gcp/google
    parameters: *build_parameters
      - attach_workspace:
          root: .
      - gcp/install
      - configure_google_sdk
      - gcp/initialize:
          gcloud-service-key: GCLOUD_SERVICE_KEY_DECODED
      - get_bucket: <<< HOW_TO_DO_THIS >>>
          environment: <<parameters.environment>>
          dashboard_type: <<parameters.dashboard_type>>
      - gcp-storage/upload:
        source_path: dist/apps/<<parameters.dashboard_type>>-admin/**
        destination_bucket: $BUCKET_NAME

My only solution so far has been to write a custom bash script which would map things inside code(:scream:) and set $BUCKET_NAME environment variable. It seems like a massive overkill for such a simple thing, and the last thing I want is to store a mapping in some cryptic bash script.
Any better ideas?

With Github actions I can read from JSON files directly. Maybe something like this exists for cirleci?


Are you looking for matrix jobs we have a link to our documentation below:

If this is not what you are looking for please feel free to raise a support ticket using the link below

Kind Regards
Owen Oliver

@Maxim-Filimonov Did you find any native solution here? This is kind of shocking :grin: