This module creates a Shared Image Gallery resource with apiVersion 2019-12-01.

{"type": "microsoft.compute/virtualmachines", "apiversion": "2020-12-01", "name": "[parameters('vmname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "properties": {"hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "storageprofile": {"osdisk": {"createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('osdisktype')]"}}, "imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "18.04-lts", "version": "latest"}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces", variables('networkinterfacename'))]"}]}, "osprofile": {"computername": "[parameters('vmname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminkey')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[concat('/home/", parameters('adminusername'), "/.ssh/authorized_keys')]", "keydata": "[parameters('adminkey')]"}]}}}}}{"type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('vmname'),"/customscript')]", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", parameters('vmname'))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "protectedsettings": {"commandtoexecute": "[concat('bash ", variables('masterscriptfilename'), " ", parameters('spclientid'), " ", parameters('spclientsecret'), " ", resourcegroup().name, " ", variables('subscriptionid'), " ", variables('tenantid'))]", "fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptsdir'), "/", variables('masterscriptfilename'), parameters('_artifactslocationsastoken')))]"]}}}{"type": "microsoft.compute/virtualmachinescalesets", "apiversion": "2020-12-01", "name": "[parameters('vmssname')]", "tags": {"cluster-autoscaler-enabled": "true", "cluster-autoscaler-name": "[resourcegroup().name]", "min": "[parameters('minnodecount')]", "max": "[parameters('maxnodecount')]", "poolname": "[parameters('vmssname')]"}, "dependson": ["[resourceid('microsoft.network/networkinterfaces/", variables('networkinterfacename'))]"], "location": "[parameters('location')]", "sku": {"name": "[parameters('vmsize')]", "tier": "standard", "capacity": "[parameters('defaultnodecount')]"}, "properties": {"overprovision": false, "upgradepolicy": {"mode": "manual"}, "virtualmachineprofile": {"storageprofile": {"osdisk": {"createoption": "fromimage", "caching": "readwrite"}, "imagereference": {"publisher": "canonical", "offer": "ubuntuserver", "sku": "18.04-lts", "version": "latest"}}, "osprofile": {"computernameprefix": "[parameters('vmssname')]", "adminusername": "[parameters('adminusername')]", "adminpassword": "[parameters('adminkey')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[concat('/home/", parameters('adminusername'), "/.ssh/authorized_keys')]", "keydata": "[parameters('adminkey')]"}]}}}, "networkprofile": {"networkinterfaceconfigurations": [{"name": "[concat('nic", parameters('vmssname'))]", "properties": {"primary": true, "ipconfigurations": [{"name": "[concat('ipconfigvmss", parameters('vmssname'))]", "properties": {"subnet": {"id": "[variables('vmsssubnetref')]"}, "publicipaddressconfiguration": {"name": "[variables('vmsspublicipaddressname')]", "properties": {"idletimeoutinminutes": 10, "dnssettings": {"domainnamelabel": "[parameters('vmssdnslabelprefix')]"}}}}}]}}]}, "extensionprofile": {"extensions": [{"name": "customvmssscript", "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "protectedsettings": {"commandtoexecute": "[concat('bash ", variables('vmssscriptfilename'), " ", parameters('spclientid'), " ", parameters('spclientsecret'), " ", resourcegroup().name, " ", variables('subscriptionid'), " ", variables('tenantid'), " ", parameters('location'), " ", parameters('vmsssubnetname'), " ", parameters('virtualnetworkname'))]", "fileuris": ["[uri(parameters('_artifactslocation'), concat(variables('scriptsdir'), "/", variables('vmssscriptfilename'), parameters('_artifactslocationsastoken')))]"]}}}]}}}}