Feb 19 2017 08:59 PM
Hi All,
I have question regarding ARM templates API versions. I notice that when I create some resources I have to specify different API Versions for them. Is there any common API version we can apply ? because sometimes its so cumbersome to use different API versions for different resources.
Thanks
Mar 28 2017 04:38 PM
Great question! We're looking into this and will try to get an answer for you.
Apr 01 2017 04:49 AM
May 28 2017 09:48 AM
SolutionHi Kasun!
Excellent question!
For ARM templates, you must specify an API version for every resource type you will deploy. This API version corresponds to a version of REST API operations that are released by the resource provider (Microsoft.Compute/virtualMachines is the resource provider and namespace for virtual machines, Microsoft.Storage/storageAccounts is the resource provider and namespace for storage and storage accounts - as examples)
Whenever a resource provider enables new features, it releases a new version of the REST API.
In order for you to leverage new features, you must then use the new API version.
Now, for you to know which API version to use, you can run the following PowerShell cmdlet to retrieve this info, for a selected resource provider:
((Get-AzureRmResourceProvider -ProviderNamespace Microsoft.Web).ResourceTypes | Where-Object ResourceTypeName -eq sites).ApiVersions
Thanks!
Jul 30 2017 07:21 PM
Hi Kristian,
Thanks for the solution suggested, but in my openion Azure team should improve this to use less APIs versions for different resource deployment.
Thanks