ARM template location valure change

sns 9,226 Reputation points

how do we change the parameter value location from east us to west us ( for ARM Template) in the azure pipelines without touching changing the code in the repo?

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,141 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sedat SALMAN 13,180 Reputation points

    To change the location value of an ARM template deployment without modifying the code in the repo, you can pass the parameter value in your Azure DevOps pipeline. You can do this using the overrideParameters property of the AzureResourceManagerTemplateDeployment@3 task in your Azure pipeline YAML file. Example YAML:

    - main
      vmImage: 'ubuntu-latest'
    - task: AzureResourceManagerTemplateDeployment@3
        azureResourceManagerConnection: 'YourAzureConnectionName'
        subscriptionId: 'your-subscription-id'
        resourceGroupName: 'your-resource-group-name'
        location: 'West US'
        csmFile: 'path/to/your/arm/template.json'
        csmParametersFile: 'path/to/your/arm/parameters.json'
        overrideParameters: '-location "West US"'
        deploymentMode: 'Incremental'
    0 comments No comments