{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "serverName": { "type": "string", "metadata": { "description": "Server Name for Azure database for PostgreSQL" } }, "administratorLogin": { "type": "string", "minLength": 1, "metadata": { "description": "Database administrator login name" } }, "administratorLoginPassword": { "type": "securestring", "minLength": 8, "metadata": { "description": "Database administrator password" } }, "skuCapacity": { "type": "int", "defaultValue": 2, "metadata": { "description": "Azure database for PostgreSQL compute capacity in vCores (2,4,8,16,32)" } }, "skuName": { "type": "string", "defaultValue": "GP_Gen5_2", "metadata": { "description": "Azure database for PostgreSQL sku name " } }, "skuSizeMB": { "type": "int", "defaultValue": 51200, "metadata": { "description": "Azure database for PostgreSQL Sku Size " } }, "skuTier": { "type": "string", "defaultValue": "Basic", "metadata": { "description": "Azure database for PostgreSQL pricing tier" } }, "skuFamily": { "type": "string", "defaultValue": "Gen5", "metadata": { "description": "Azure database for PostgreSQL sku family" } }, "postgresqlVersion": { "type": "string", "defaultValue": "11", "allowedValues": [ "9.5", "9.6", "10", "11" ], "metadata": { "description": "PostgreSQL version" } }, "backupRetentionDays": { "type": "int", "defaultValue": 7, "metadata": { "description": "PostgreSQL Server backup retention days" } }, "geoRedundantBackup": { "type": "string", "defaultValue": "Disabled", "metadata": { "description": "Geo-Redundant Backup setting" } } }, "resources": [ { "type": "Microsoft.DBforPostgreSQL/servers", "apiVersion": "2017-12-01", "name": "[parameters('serverName')]", "location": "[resourceGroup().location]", "sku": { "name": "[parameters('skuName')]", "tier": "[parameters('skuTier')]", "capacity": "[parameters('skuCapacity')]", "size": "[parameters('skuSizeMB')]", "family": "[parameters('skuFamily')]" }, "properties": { "createMode": "Default", "version": "[parameters('postgresqlVersion')]", "administratorLogin": "[parameters('administratorLogin')]", "administratorLoginPassword": "[parameters('administratorLoginPassword')]", "storageProfile": { "storageMB": "[parameters('skuSizeMB')]", "backupRetentionDays": "[parameters('backupRetentionDays')]", "geoRedundantBackup": "[parameters('geoRedundantBackup')]" } } }, { "type": "Microsoft.DBforPostgreSQL/servers/firewallRules", "apiVersion": "2017-12-01", "name": "[concat(parameters('serverName'), '/AllowAll_2021-7-6_16-16-15')]", "dependsOn": [ "[resourceId('Microsoft.DBforPostgreSQL/servers', parameters('serverName'))]" ], "properties": { "startIpAddress": "0.0.0.0", "endIpAddress": "255.255.255.255" } } ] }