This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.
{"type": "microsoft.compute/virtualmachines", "apiversion": "2019-12-01", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[parameters('storageaccountname')]", "[variables('nicname')]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminpassword')]"}, "storageprofile": {"imagereference": "[variables('imagereference')[parameters('windowsversion')]]", "osdisk": {"caching": "readwrite", "createoption": "fromimage"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('nicname'))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[reference(resourceid(parameters('storageaccountresourcegroupname'), "microsoft.storage/storageaccounts/", parameters('storageaccountname')), "2019-06-01').primaryendpoints.blob]"}}}, "resources": [{"type": "extensions", "apiversion": "2019-12-01", "name": "installscript", "location": "[parameters('location')]", "dependson": ["[parameters('vmname')]"], "properties": {"publisher": "microsoft.compute", "type": "customscriptextension", "typehandlerversion": "1.8", "autoupgrademinorversion": true, "settings": {"fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptfilename'), parameters('_artifactslocationsastoken')))]"], "commandtoexecute": "[concat('powershell -executionpolicy unrestricted -file ", variables('scriptfilename'), " ", parameters('javapackagename'))]"}}}]} 