Deploy a new SQL Elastic Pool.
{"type": "microsoft.sql/servers", "apiversion": "2020-02-02-preview", "location": "[parameters('location')]", "name": "[parameters('servername')]", "properties": {"administratorlogin": "[parameters('administratorlogin')]", "administratorloginpassword": "[parameters('administratorloginpassword')]", "version": "12.0"}}{"type": "microsoft.sql/servers/elasticpools", "apiversion": "2020-02-02-preview", "dependson": ["[resourceid('microsoft.sql/servers/", parameters('servername'))]"], "location": "[parameters('location')]", "name": "[concat(parameters('servername'), "/", parameters('elasticpoolname'))]", "sku": {"name": "[variables('skuname')]", "tier": "[variables('skutier')]", "capacity": "[parameters('capacity')]"}, "properties": {"perdatabasesettings": {"mincapacity": "[parameters('databasecapacitymin')]", "maxcapacity": "[parameters('databasecapacitymax')]"}}}{"type": "microsoft.sql/servers/databases", "name": "[concat(parameters('servername'), "/", parameters('databasesnames')[copyindex()])]", "location": "[parameters('location')]", "apiversion": "2020-02-02-preview", "dependson": ["[resourceid('microsoft.sql/servers/", parameters('servername'))]", "[resourceid('microsoft.sql/servers/elasticpools", parameters('servername'), parameters('elasticpoolname'))]"], "sku": {"name": "elasticpool", "tier": "[variables('skutier')]", "capacity": 0}, "properties": {"collation": "[parameters('databasecollation')]", "elasticpoolid": "[resourceid('microsoft.sql/servers/elasticpools", parameters('servername'), parameters('elasticpoolname'))]"}, "copy": {"name": "adddatabasesinelasticpool", "count": "[length(parameters('databasesnames'))]"}}{"apiversion": "2020-02-02-preview", "dependson": ["[resourceid('microsoft.sql/servers/", parameters('servername'))]"], "location": "[parameters('location')]", "name": "[concat(parameters('servername'), "/", "allowallwindowsazureips')]", "properties": {"endipaddress": "0.0.0.0", "startipaddress": "0.0.0.0"}, "type": "microsoft.sql/servers/firewallrules"} 