Switch branches/tags
Find file Copy path
9dde65b Apr 11, 2017
1 contributor

Users who have contributed to this file

75 lines (52 sloc) 3.48 KB

Deploy to Azure

Deploy to Azure allows you to dynamically generate a Create form based on a Resource Manager template. The form is generated based on the input parameters defined in the template. The most common use of the Deploy to Azure button is for community templates posted on Github, but you can also create a Marketplace package that uses the Deploy to Azure blade. This is the simplest way to publish a Create experience in the Azure portal.

Linking from the web

To deep-link to the template deployment blade, URL-encode your hosted template URL and append it to the end of this URL:**<url-encoded-template-path>**

For instance, this simple storage account template...

Would be this URL...

To add a Deploy to Azure button to your Github project, add the following markdown, replacing the {encodedTemplateUrl} with a URI-encoded link to your template.

[![Deploy to Azure](../media/portalfx-create-deploytoazure/deploybutton.png)]({encodedTemplateUrl})

Or in HTML...

<a href="{encodedTemplateUrl}"><img src=""></a>

Adding to the Marketplace

To create a custom Marketplace package that can be hosted directly in the Marketplace, create your package as you normally would, but instead of a custom UIDefinition.json file, use the following:

    "$schema": "",
    "createDefinition": {
        "createBlade": {
            "name": "DeployToAzure",
            "extension": "HubsExtension"

If you want to make your custom package read-only (so people cannot edit the template), add readonlytemplate to the list of category ids.

Both of these will load your template automatically and open the list of parameters by default. Try it!

Best practices

  • Always define a defaultValue for parameters, when possible
  • Define allowedValues when a parameter has a static list of values
  • Define minValue and maxValue when using a numeric range
  • Define minLength and maxLength when using string values with length constraints
  • Use group metadata to organize related parameters together
  • Use group: "basics" for the primary resource name to elevate that to the top of the form
  • Add label metadata to customize the display text for each field
  • Add description metadata to provide additional information about what the parameter is for, but only if it adds contextual values