How to deploy ARM template using url with params

Thiyagu Rajendran 1 Reputation point
2021-10-22T16:01:04.297+00:00

I need to deploy a AKS using ARM template with a url. I guess it is possible using a url prefixed with https://portal.azure.com/#create/Microsoft.Template/uri/ followed by the location to the template url encoded.

Is it possible to pass parameters in the url to override the template parameters?

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,855 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SRIJIT-BOSE-MSFT 4,326 Reputation points Microsoft Employee
    2021-10-25T08:15:10.597+00:00

    @Thiyagu Rajendran , thank you for your question.

    You can follow the steps to Deploy with the REST API

    You can define a parameters file and provide the link in the Request Body like:

    {  
     "properties": {  
       "templateLink": {  
         "uri": "<template-link>",  
         "contentVersion": "<content-version>"  
       },  
       "parametersLink": {  
         "uri": "<parameter-file-link>",  
         "contentVersion": "<content-version>"  
       },  
       ...  
     }  
    }  
    

    or

    pass parameters directly in the Request Body like:

    {  
     "properties": {  
       "templateLink": {  
         "uri": "<template-link>",  
         "contentVersion": "<content-version>"  
       },  
       "parameters": {  
         ...  
       },  
       ...  
     }  
    }  
    

    For more information on creating Azure Resource Manager parameter files please check here.

    Parameter precedence

    You can use inline parameters and a local parameter file in the same deployment operation. For example, you can specify some values in the local parameter file and add other values inline during deployment. If you provide values for a parameter in both the local parameter file and inline, the inline value takes precedence.

    It's possible to use an external parameter file, by providing the URI to the file. When you use an external parameter file, you can't pass other values either inline or from a local file. All inline parameters are ignored. Provide all parameter values in the external file.

    ----
    Hope this helps.

    Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.