title: Azure DevOps Parameters not recognised by AZ CLI
body: <p>I am having issues passing parameters defined in an Azure Pipeline YAML to AZ Cli located in a bash script. I found the following solution on Stackoverflow but it doesn't seem to work:
  <a href="https://stackoverflow.com/questions/55713925/pass-parameter-to-azure-cli-task-in-devops">Pass parameter to Azure CLI Task in DevOps</a></p>
  <p>Here is my YAML file:</p>
  <pre><code># Starter pipeline
  # Start with a minimal pipeline that you can customize to build and deploy your code.
  # Add steps that build, run tests, deploy, and more:
  # https://aka.ms/yaml
  
  trigger:
  - master
  
  pool:
    vmImage: 'ubuntu-latest'
  
  steps:
  - task: AzureCLI@2
    displayName: Azure CLI
    inputs:
      azureSubscription: templateresourceconnection
      scriptType: bash
      scriptPath: ./deployment.sh
      arguments:
        -resourceGrp 'TEST-RG'
        -location 'westeurope'
  </code></pre>
  <p>I would expect to be able to access the arguments in my deployment.sh, which fails:</p>
  <pre><code>
  #!/bin/bash
  
  # Create Resource Group
  az group create -n $(resourceGrp) -l $(location)
  </code></pre>
  <p>If I don't pass any arguments and hardcode the values in deployment.sh it all works fine.
  Any ideas what could cause this issue? I also tried with UPPERCASE and just without brackets.</p>
  <p>I get the following error message</p>
  <p><a href="https://i.stack.imgur.com/wn7as.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wn7as.png" alt="Azure Pipelines Error Message" /></a></p>
  <p>Do you have any idea what else I could try to make it work. Seems like the documentation doesn't contain any example for az cli. Just how to define parameters but not how to pass them afterwards.</p>
  <p>Thank you.</p>