title: Azure Pipeline - Use variable set in template task as a parameter in another template task
body: <p>I have two templates created -- one for getting and setting some configurations such as region names and one for deploying. I'm trying to use the variables set in the configuration template task as parameter inputs to the deploy template. Is there an actual way of doing this?</p>
  
  <p>My config template:</p>
  
  <pre><code>steps:
  - task: AzureCLI@2
    name: Config
    displayName: Get Config and Generate Variables
    inputs:
      azureSubscription: '$(Subscription)'
      scriptType: bash
      scriptLocation: inlineScript
      inlineScript: |
          Environment="prod"
          echo "##vso[task.setvariable variable=Environment;isOutput=true]prod"
          echo "##vso[task.setvariable variable=EastName;isOutput=true]$(AppNamePrefix)-$Environment-eastus"
          echo "##vso[task.setvariable variable=East2Name;isOutput=true]$(AppNamePrefix)-$Environment-eastus2"
          echo "##vso[task.setvariable variable=CentralName;isOutput=true]$(AppNamePrefix)-$Environment-centralus"
          echo "##vso[task.setvariable variable=WestName;isOutput=true]$(AppNamePrefix)-$Environment-westus"
  </code></pre>
  
  <p>and my deploy template looks like this:</p>
  
  <pre><code>parameters:
  - name: artifactName
    type: string
    default: MyBuildOutputs
  - name: appFullName
    type: string
  - name: condition
    type: boolean
    default: true
  
  steps:
  - task: AzureFunctionApp@1
    condition: ${{ parameters.condition }}
    displayName: 'Production deploy'
    inputs:
      azureSubscription: '$(Subscription)'
      appType: 'functionApp'
      appName: ${{ parameters.appFullName }}
      package: '$(System.ArtifactsDirectory)/${{ parameters.artifactName }}/$(Build.BuildId).zip'
      deploymentMethod: 'auto'
  </code></pre>
  
  <p>and my stage for this looks like so (with unnecessary bits cutout):</p>
  
  <pre><code>- template: ../../tasks/azure/getConfig.yml
  - template: ../../tasks/azure/deployToFA.yml
    parameters:
      appFullName: $(EastName)
  </code></pre>
  
  <p>I have tried the following for <code>appFullName: &lt;name&gt;</code>:</p>
  
  <ul>
  <li><code>$(EastName)</code></li>
  <li><code>${{ EastName }}</code></li>
  <li><code>$[ EastName ]</code></li>
  <li><code>$EastName</code></li>
  </ul>
  
  <p>but, sadly, none of these seem to work as they all get pulled in as literals. Is there a way of doing this? I have seen ways of using <code>dependsOn</code> but I don't want the hidden dependency between the two templates (if that's even possible)</p>