diff --git a/azuredeploy.json b/azuredeploy.json index a575d33b..190a5bbc 100644 --- a/azuredeploy.json +++ b/azuredeploy.json @@ -2,6 +2,24 @@ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.2", "parameters": { + "sqlServerName": { + "type": "string", + "metadata": { + "description": "The SQL Server name (must be unique). If you have an existing SQL Server in your resource group, you can specify its name and include its login credentials below." + } + }, + "sqlAdministratorLogin": { + "type": "string", + "metadata": { + "description": "The Administrator login username for the SQL Server specified above" + } + }, + "sqlAdministratorLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The Administrator login password for the SQL Server specified above" + } + }, "sqlDatabaseEditionTierDtuCapacity": { "type": "string", "defaultValue": "Basic-Basic-5-2", @@ -26,37 +44,19 @@ "GeneralPurpose-GP_S_Gen5_2-2-250" ], "metadata": { - "description": "Describes the database Edition, Tier, Dtu, Gigabytes (Edition-Tier-Dtu-Gigabytes)" - } - }, - "sqlServerName": { - "type": "string", - "metadata": { - "description": "The name of the sql server. It has to be unique." + "description": "The SQL Database Configuration (Edition-Tier-DTU-Capacity)" } }, "sqlDatabaseName": { "type": "string", "metadata": { - "description": "The name of the sql database. It has to be unique." - } - }, - "sqlAdministratorLogin": { - "type": "string", - "metadata": { - "description": "The admin user of the SQL Server." - } - }, - "sqlAdministratorLoginPassword": { - "type": "securestring", - "metadata": { - "description": "The password of the admin user of the SQL Server." + "description": "The SQL Database name (must be unique)" } }, "BlazorWebsiteName": { "type": "string", "metadata": { - "description": "The name of the website. It has to be unique." + "description": "The App Service name for the Blazor Website (must be unique)" } }, "BlazorSKU": { @@ -77,28 +77,12 @@ ], "defaultValue": "B1", "metadata": { - "description": "The SKU for the App Service Plan" - } - }, - "BlazorSKUCapacity": { - "type": "int", - "defaultValue": 1, - "maxValue": 3, - "minValue": 1, - "metadata": { - "description": "Describes plan's instance count" - } - }, - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Location for all resources." + "description": "The App Service SKU for the Blazor Website" } } }, "variables": { - "hostingPlanName": "[concat('Oqtane-hostingplan-', uniqueString(resourceGroup().id))]", + "hostingPlanName": "[concat('Oqtane-HostingPlan-', uniqueString(resourceGroup().id))]", "databaseCollation": "SQL_Latin1_General_CP1_CI_AS", "databaseEditionTierDtuCapacity": "[split(parameters('sqlDatabaseEditionTierDtuCapacity'),'-')]", "databaseEdition": "[variables('databaseEditionTierDtuCapacity')[0]]", @@ -117,7 +101,7 @@ "type": "Microsoft.Sql/servers", "apiVersion": "2022-05-01-preview", "name": "[parameters('sqlServerName')]", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "tags": { "displayName": "SQL Server" }, @@ -134,7 +118,7 @@ "type": "Microsoft.Sql/servers/databases", "apiVersion": "2022-05-01-preview", "name": "[format('{0}/{1}', parameters('sqlServerName'), parameters('sqlDatabaseName'))]", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "tags": { "displayName": "Database" }, @@ -190,13 +174,13 @@ "type": "Microsoft.Web/serverfarms", "apiVersion": "2022-03-01", "name": "[variables('hostingPlanName')]", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "tags": { "displayName": "Blazor" }, "sku": { "name": "[parameters('BlazorSKU')]", - "capacity": "[parameters('BlazorSKUCapacity')]" + "capacity": "1" }, "properties": { "name": "[variables('hostingPlanName')]", @@ -212,7 +196,7 @@ "apiVersion": "2022-03-01", "name": "[parameters('BlazorWebsiteName')]", "kind": "app", - "location": "[parameters('location')]", + "location": "[resourceGroup().location]", "tags": { "[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName')))]": "empty", "displayName": "Website"