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

{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('haproxyavailabilitysetname')]", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 3, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}{"apiversion": "2020-12-01", "type": "microsoft.compute/availabilitysets", "name": "[variables('appavailabilitysetname')]", "location": "[parameters('location')]", "properties": {"platformupdatedomaincount": 3, "platformfaultdomaincount": 2}, "sku": {"name": "aligned"}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('haproxyvmnameprefix'), copyindex())]", "copy": {"name": "haproxyvmloop", "count": "[variables('numberofhaproxyinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(parameters('haproxyvmnameprefix'), variables('nicnameprefix'), copyindex()))]", "[resourceid('microsoft.compute/availabilitysets/", variables('haproxyavailabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets",variables('haproxyavailabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(parameters('haproxyvmnameprefix'), copyindex())]", "adminusername": "[parameters('adminusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[variables('sshkeypath')]", "keydata": "[parameters('sshkeydata')]"}]}}}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('haproxyvmnameprefix'), "osdisk-", copyindex())]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('storageaccounttype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(parameters('haproxyvmnameprefix'), variables('nicnameprefix'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[concat(reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-01-01').primaryendpoints.blob)]"}}}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines", "name": "[concat(parameters('appvmnameprefix'), copyindex())]", "copy": {"name": "appvmloop", "count": "[variables('numberofappinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts/", variables('storageaccountname'))]", "[resourceid('microsoft.network/networkinterfaces/", concat(parameters('appvmnameprefix'), variables('nicnameprefix'), copyindex()))]", "[resourceid('microsoft.compute/availabilitysets/", variables('appavailabilitysetname'))]"], "properties": {"availabilityset": {"id": "[resourceid('microsoft.compute/availabilitysets",variables('appavailabilitysetname'))]"}, "hardwareprofile": {"vmsize": "[parameters('vmsize')]"}, "osprofile": {"computername": "[concat(parameters('appvmnameprefix'), copyindex())]", "adminusername": "[parameters('adminusername')]", "linuxconfiguration": {"disablepasswordauthentication": true, "ssh": {"publickeys": [{"path": "[variables('sshkeypath')]", "keydata": "[parameters('sshkeydata')]"}]}}}, "storageprofile": {"imagereference": {"publisher": "[variables('imagepublisher')]", "offer": "[variables('imageoffer')]", "sku": "[parameters('ubuntuosversion')]", "version": "latest"}, "osdisk": {"name": "[concat(parameters('appvmnameprefix'), "osdisk-", copyindex())]", "caching": "readwrite", "createoption": "fromimage", "manageddisk": {"storageaccounttype": "[variables('storageaccounttype')]"}}}, "networkprofile": {"networkinterfaces": [{"id": "[resourceid('microsoft.network/networkinterfaces",concat(parameters('appvmnameprefix'), variables('nicnameprefix'),copyindex()))]"}]}, "diagnosticsprofile": {"bootdiagnostics": {"enabled": true, "storageuri": "[concat(reference(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-01-01').primaryendpoints.blob)]"}}}}{"apiversion": "2020-12-01", "type": "microsoft.compute/virtualmachines/extensions", "name": "[concat(parameters('appvmnameprefix'), copyindex(), "/configureappvm')]", "copy": {"name": "appvmextensionsloop", "count": "[variables('numberofappinstances')]"}, "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.compute/virtualmachines/", concat(parameters('appvmnameprefix'), copyindex()))]"], "properties": {"publisher": "microsoft.azure.extensions", "type": "customscript", "typehandlerversion": "2.0", "autoupgrademinorversion": true, "settings": {"fileuris": "[variables('appvmscripts').fileuris]"}, "protectedsettings": {"commandtoexecute": "[variables('appvmscripts').commandtoexecute]"}}}