deploytemplate.py
Python program to deploy an Azure template from a github repo, with a local parameters.json file
If running in an Azure cloud shell the program will authenticate to Azure using an MSI endpoint.
If running in other environemnts create an azurermtemplate.json to authenticate.
To call this program, see the example shell scripts: runit.sh, runwait.sh (waits for deployment to complete), debugrun.sh.
Tools to cleanup resources
listrg.py - list Azure resource groups
deleterg.py - delete the specified Azure resource group
apiupgradeer.py - Template API updater
Python script to update API versions in Azure Resource Manager templates
This script will create API version variables for Compute, Network, Storage, Insights resources, and set each resource type to the appropriate API version. Use it when you need to upgrade an Azure Resource Manager template to a new API version for one or more resources.
The script also adds an "overprovision" property to any Microsoft.Compute/virtualMachineScaleSets resources if not present. This property is set to true.
Installation and Usage
- Install Python 3.x.
- Clone this repo locally or just copy apiUpgrader.py and run it locally
- Make sure the apiUpgrader file has current API versions set for Azure resources like Compute, Storage, Network, Insights. Edit the file as needed.
- Usage: python apiUpgrader.py inputfile.json > outputfile.json
- Inspect the output file. If the original version had a variable defined like "apiVersion" it may no longer be needed. Check the variables section of the template for any variables which are no longer referenced.
- If your template has VM Scale Set resources and you don't want the default overprovision behavior, set the overprovision property to "false".
- Do a successful test deployment of the template before declaring it upgraded.