# Two value into matrix element

**URL:** <https://discuss.circleci.com/t/two-value-into-matrix-element/39827>\
**Category:** Build Environment\
**Tags:** circle-yml\
**Created:** [April 19, 2021, 10:12am UTC](https://discuss.circleci.com/t/two-value-into-matrix-element/39827 "2021-04-19T10:12:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruzakaranbol](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@ruzakaranbol](https://discuss.circleci.com/u/ruzakaranbol)\
**Post date:** [April 19, 2021, 10:12am UTC](https://discuss.circleci.com/t/two-value-into-matrix-element/39827/1 "2021-04-19T10:12:31Z")

</div>

I need for one job to pass two values for the environment. Jobs should generate dynamically with matrix. Is it possible to pass to the job environment two values first for the command variable and second for the suffix variable?  
I am aware that the code below doesn’t work but It should seem like it.

```
    version: 2.1
    workflows:
      version: 2
      deploy-adapter:
        jobs:
          - deploy-adapter-stage:
              matrix:
                parameters:
                  command: [
                    ['suffix1', 'command1'],
                    ['suffix2', 'command2'],
                    ['suffix3', 'command3'],
                  ]

    jobs:
      deploy-adapter-stage:
        parameters:
          command:
            type: enum
        environment:
          SERVICE_SUFFIX: <<parameters.command[0]>>
          SYNC_COMMAND: <<parameters.command[1]>>
        machine: true
        steps:
          - create-task-and-service-definition
          - deploy-ecs
```

---

<div class="post-metadata">

**Author:** ![yannCI](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/yannci/32/24866_2.png) [@yannCI](https://discuss.circleci.com/u/yannCI)\
**Post date:** [April 25, 2021, 3:11pm UTC](https://discuss.circleci.com/t/two-value-into-matrix-element/39827/2 "2021-04-25T15:11:19Z")

</div>

Hi @ruzakaranbol! Welcome to the CircleCI Discuss community!

My understanding of what you’re trying to achieve is that you’d like the job `deploy-adapter-stage` to run for specific combinations only: `'suffix1' + 'command1'`, then '`suffix2' + 'command2'`, and finally `'suffix3' + 'command3'`. But not for any other combination.

Is this correct?
