title: Dynamic Variables in Azure Pipeline Template
body: <p>I am working on a template to help streamline our deployments to our on-premise IIS Servers. Usernames and passwords are stored in an Azure Key Vault, but when I go to use them in the Web App Management Task, I cannot access them. I am thinking I just have the syntax wrong. </p>
  
  <p>To get the keys in the Azure Key Vault, I am using the following task. This works in that it finds the keys and doesn't give me an error.</p>
  
  <pre><code>- task: AzureKeyVault@1
    inputs:
      azureSubscription : '_MyServiceConnectionHere_'
      KeyVaultName : '_MyVaultNameHere_'
      SecretsFilter : '${{ parameters.websiteName }}-AppPoolUsername,${{ parameters.websiteName }}-AppPoolPassword'
  </code></pre>
  
  <p>This is how I am using them in the IIS Web App Manage Task. (I have abbreviated the following to the relevant parts.) </p>
  
  <pre><code>- task: IISWebAppManagementOnMachineGroup@0
    displayName: Update Website and App Pool
    inputs:
      AppPoolNameForWebsite: ${{ parameters.websiteName }}
      DotNetVersionForWebsite: 'No Managed Code'
      AppPoolIdentityForWebsite: 'specificUser'
      AppPoolUsernameForWebsite: ${{variables['${{parameters.websiteName}}-AppPoolUsername']}}
      AppPoolPasswordForWebsite: ${{variables['${{parameters.websiteName}}-AppPoolPassword']}}
      AppPoolName: ${{ parameters.websiteName }}
  </code></pre>
  
  <p>Here, the username and password don't resolve. As you can see, I am attempting to retrieve them using the following syntax:</p>
  
  <pre><code>${{variables['${{parameters.websiteName}}-AppPoolUsername']}}
  </code></pre>
  
  <p>What is the proper syntax for retrieving variables by a key name that has been composed?</p>