With the release of Azure Resource Manager on Microsoft Azure Government (MAG), users are now able to provision and deploy applications using declarative templates. A full listing of publicly contributed templates can be found at https://azure.microsoft.com/en-us/documentation/templates/ .
How to use QuickStart Templates in MAG
Many of the contributed templates in our Github repo https://github.com/Azure/azure-quickstart-templates will work on MAG without modification. Deploy options are described below.
Templates that don’t follow the best practices outlined in our Github repo typically won’t run for a couple reasons.
Hardcoded namespace for storage
MAG uses different endpoints for services like storage. If the template hardcodes blob.core.windows.net for say an OSdisk, the template will fail on MAG. Instead, templates should reference the namespace like:
“osDisk”: {“name”: “osdisk”,”vhd”: {“uri”: “[concat(reference(concat(‘Microsoft.Storage/storageAccounts/’,variables(‘storageAccountName’)), ‘2015-06-15’).primaryEndpoints.blob, variables(‘vmStorageAccountContainerName’),
‘/’,variables(‘OSDiskName’),’.vhd’)]”}} |
Hardcoded locations in template outside of MAG
Our best practices state “Do not use a parameter to specify the location. Use the location property of the resourceGroup instead. By using the resourceGroup().location expression for all your resources, the resources in the template will automatically be deployed in the same location as the resource group.”
If you see US East or other commercial regions hardcoded in a template, you can either modify them with the MAG region you want to use or update the template to follow the best practices.
See Best Practices Guide for more information.
Ways to Deploy
Use the “Deploy to Azure” link
Many template will have a “Deploy to Azure” button that allows one-click deployment to Azure commercial. You can re-direct this to MAG by following these simple steps
- Right-click the button and select copy link
- Paste link into your browser but don’t click enter yet
- Go to the beginning of the URL and change portal.azure.com to portal.azure.us.
- Click Enter
Powershell
Once you are logged into MAG, you can deploy templates using the commercial documentation.
https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-deploy/
Copy and Paste into Portal
Browse to MAG portal, https://portal.azure.us and follow the commercial documentation.
https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-deploy-portal/
We welcome your comments and suggestions to help us continually improve your Azure Government experience. To stay up to date on all things Azure Government, be sure to subscribe to our RSS feed and to receive emails, click “Subscribe by Email!” on the Azure Government Blog. To experience the power of Azure Government for your organization, sign up for an Azure Government Trial.