title: How to get variable values from pipeline resources in azure pipelines
body: <p>Basically, I have 2 Individual Azure Pipelines (CI, CD). And, I have enabled trigger only for the CI pipeline. Once the CI (build) pipeline was completed, it should trigger the CD pipeline. And, I am passing the parameters and variables in the CI pipeline. But, I want to utilize the same CI parameter values in the CD pipeline also.</p>
  <pre><code>### CI Pipeline ###
  parameters:
  - name: environment
    displayName: 'Choose Environment'
    type: string
    default: Dev
    values:
      - Dev
      - Qa
      - Stage
      - Demo
      - Live
  
  variables:
  - group: PoC-Web
  - group: PoC-Secrets
  - name: version
  </code></pre>
  <p>In the CI Pipeline, am using the environment parameter and declaring the version variable. Now, I want to Utilize these values in the CD Pipeline.</p>
  <pre><code>### CD Pipeline ###
  resources:
    pipelines:
    - pipeline: web-ci
      source: PoC-Web-CI
      trigger:
       branches: 
        include:
          - cicd/azure-pipelines
          - develop
  stages:
  - stage: 'Package_Deploy'
    jobs:
    - deployment: 'Deploy_to_Server'
      environment: 'PoC-Web.PoC_WEB_SERVER'
      strategy:
        rolling:
          deploy:
            steps:
            - task: CmdLine@2
              inputs:
                script: |              
                  echo &quot;Fetching CI Pipeline Environment Variables&quot;
                  echo &quot;Pipeline-ID: $(resources.pipeline.web-ci.pipelineID)&quot;
                  echo &quot;Source-Commit: $(resources.pipeline.web-ci.sourceCommit)&quot;
                  echo &quot;Version: $(resources.pipeline.web-ci.version)&quot;
                  echo &quot;Version: $(resources.pipeline.web-ci.variables.version)&quot;
                  echo &quot;environment: $(resources.pipeline.web-ci.parameters.environment)&quot;
                  echo &quot;environment: $(resources.pipeline.web-ci.templateParameters.environment)&quot;
  </code></pre>
  <p>In the above CD pipeline, am able to get the pipeline-Id &amp; Source-Commit (i.e., predefined variables). But unable to fetch the user-defined variables and parameter values like version and parameter.</p>
  <p>An early reply would be appreciated.</p>