Templates/DB.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "sqlName": { "type": "string", "defaultValue": "", "metadata": { "description": "The primary name of the SQL Server." } }, "dbName": { "type": "string", "defaultValue": "db%UID%", "metadata": { "description": "The DB name." } }, "dbLocation": { "type": "string", "defaultValue": "%LOCATION%", "metadata": { "description": "DB Location." } }, "dbEdition": { "type": "string", "defaultValue": "Basic", "allowedValues": [ "Basic", "Standard", "Premium" ], "metadata": { "description": "The DB edition." } }, "dbMaxSizeBytes": { "type": "string", "defaultValue": "1073741824", "metadata": { "description": "Max size of the DB in bytes." } }, "dbCollation": { "type": "string", "defaultValue": "SQL_Latin1_General_CP1_CI_AS", "metadata": { "description": "The DB Collation method." } }, "dbRequestedServiceObjectiveName": { "type": "string", "defaultValue": "Basic", "allowedValues": [ "Basic", "S0", "S1", "S2", "P1", "P2", "P3" ], "metadata": { "description": "The DB requested service objective name." } }, "dbSampleName": { "type": "string", "defaultValue": "", "allowedValues": [ "", "AdventureWorksLT" ], "metadata": { "description": "The sample DB name (if none leave blank)." } }, "dbTags": { "type": "object", "defaultValue": { "Date": "%DATE%" }, "metadata": { "description": "DB Tags." } } }, "variables": { "dbLocation": "[if(empty(parameters('dbLocation')), resourceGroup().location, parameters('dbLocation'))]" }, "resources": [ { "apiVersion": "2017-10-01-preview", "type": "Microsoft.Sql/servers/databases", "name": "[concat(parameters('sqlName'), '/', parameters('dbName'))]", "location": "[variables('dbLocation')]", "tags": "[parameters('dbTags')]", "properties": { "collation": "[parameters('dbCollation')]", "edition": "[parameters('dbEdition')]", "maxSizeBytes": "[parameters('dbMaxSizeBytes')]", "requestedServiceObjectiveName": "[parameters('dbRequestedServiceObjectiveName')]", "sampleName": "[parameters('dbSampleName')]" } } ], "outputs": {} } |