Using Azure Service Connection names that are stored in variables group in Azure DevOps Pipeline
Background If you are using staged deployment in Azure DevOps, you will probably have multiple Azure Service Connections. So, it makes sense that you might want to use a Service Connection name that is stored in a variable group as a parameter to a templated YAML pipeline. # the build pipeline stages: - stage: UAT jobs: - deployment: ARM_Provisioning timeoutInMinutes: 0 environment: 'Staging' variables: - group: UAT pool: vmImage: 'windows-latest' strategy: runOnce: deploy: steps: - template: YAMLTemplates\ProvisionUsingARM.yml parameters: AzureResourceGroup: $(AzureResourceGroup) AzureServiceConnection: $(AzureServiceConnection) - stage: PROD jobs: - deployment: ARM_Provisioning timeoutInMinutes: 0 environment: 'Staging' variables: - group: PROD pool: vmImage: 'windows-latest' strategy: runOnce: deploy: steps: - template: YAMLTemplates\ProvisionUsingARM.yml parameters: AzureResourceGroup: $(AzureResourceGroup) AzureServiceConnection: $(AzureServiceConnection) With a template YAMLTemplates\ProvisionUsingARM.yml that uses the AzureServiceConnection variable ...