I have successfully used ARM to deploy Windows VMs in the past, but that was always with a hardcoded resource ID to the Image in question.
Because we are looking to revamp our Imaging process, we wanted to use versions to specify Image Version, instead of creating a brand new Image Definition every time. This in turn requires updating of the ARM Template to the new Image Definition ID.
Under the ImageReference Object, I am using the Resource ID of the image, and version set to 'latest'. Actual values removed of course.
"storageProfile": {
"imageReference": {
"id": "/subscriptions/{MySub}/resourceGroups/{MyRG}/providers/Microsoft.Compute/galleries/{SharedGalleryName}/images/{ImageName}",
"version": "latest"
}
}
When I attempt to deploy the ARM template I get the following failure.
{
"status": "Failed",
"error": {
"code": "InvalidTemplateDeployment",
"message": "The template deployment 'compose-deployWVM-Test' is not valid according to the validation procedure. The tracking id is '---'. See inner errors for details.",
"details": [
{
"code": "InvalidParameterConflictingProperties",
"message": "Resource 'TESTVM' has invalid parameters. Details: The property 'imageReference.id' cannot be used together with property 'imageReference.version'."
}
]
}
}
Is version something only available for Marketplace image offerings? If so, how does this offer any usability to the Versions in the Shared Image Gallery Resource other than version tracking?