|
| 1 | +{ |
| 2 | + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", |
| 3 | + "contentVersion": "1.0.0.0", |
| 4 | + "variables": { |
| 5 | + "webApiVersion": "2018-02-01", |
| 6 | + |
| 7 | + "sqlServerFqdnTidy": "[trim(toLower(parameters('sqlServerFqdn')))]", |
| 8 | + |
| 9 | + "coreSqlDatabaseNameTidy": "[trim(toLower(parameters('coreSqlDatabaseName')))]", |
| 10 | + "masterSqlDatabaseNameTidy": "[trim(toLower(parameters('masterSqlDatabaseName')))]", |
| 11 | + |
| 12 | + "cmWebAppNameTidy": "[trim(toLower(parameters('cmWebAppName')))]", |
| 13 | + "cdWebAppNameTidy": "[trim(toLower(parameters('cdWebAppName')))]" |
| 14 | + }, |
| 15 | + "parameters": { |
| 16 | + "standard": { |
| 17 | + "type": "secureObject", |
| 18 | + "defaultValue": { |
| 19 | + "infrastructure": { "sqlServerFqdn":null }, |
| 20 | + "deploymentId": null, |
| 21 | + "location": null, |
| 22 | + "sqlServerLogin": null, |
| 23 | + "sqlServerPassword": null, |
| 24 | + "coreSqlDatabaseName": null, |
| 25 | + "masterSqlDatabaseName": null, |
| 26 | + "cmWebAppName": null, |
| 27 | + "cdWebAppName": null |
| 28 | + } |
| 29 | + }, |
| 30 | + "extension": { |
| 31 | + "type": "secureObject", |
| 32 | + "defaultValue": { |
| 33 | + "cmMsDeployPackageUrl": null, |
| 34 | + "cdMsDeployPackageUrl": null |
| 35 | + } |
| 36 | + }, |
| 37 | + "infrastructure": { |
| 38 | + "type": "secureObject", |
| 39 | + "defaultValue": "[parameters('standard').infrastructure]" |
| 40 | + }, |
| 41 | + |
| 42 | + "deploymentId": { |
| 43 | + "type": "string", |
| 44 | + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" |
| 45 | + }, |
| 46 | + "location": { |
| 47 | + "type": "string", |
| 48 | + "minLength": 1, |
| 49 | + "defaultValue": "[coalesce(parameters('standard').location, resourceGroup().location)]" |
| 50 | + }, |
| 51 | + |
| 52 | + "sqlServerFqdn": { |
| 53 | + "type": "string", |
| 54 | + "minLength": 1, |
| 55 | + "defaultValue": "[parameters('infrastructure').sqlServerFqdn]" |
| 56 | + }, |
| 57 | + "sqlServerLogin": { |
| 58 | + "type": "string", |
| 59 | + "minLength": 1, |
| 60 | + "defaultValue": "[parameters('standard').sqlServerLogin]" |
| 61 | + }, |
| 62 | + "sqlServerPassword": { |
| 63 | + "type": "securestring", |
| 64 | + "minLength": 8, |
| 65 | + "defaultValue": "[parameters('standard').sqlServerPassword]" |
| 66 | + }, |
| 67 | + |
| 68 | + "coreSqlDatabaseName": { |
| 69 | + "type": "string", |
| 70 | + "minLength": 1, |
| 71 | + "defaultValue": "[coalesce(parameters('standard').coreSqlDatabaseName, concat(parameters('deploymentId'), '-core-db'))]" |
| 72 | + }, |
| 73 | + "masterSqlDatabaseName": { |
| 74 | + "type": "string", |
| 75 | + "minLength": 1, |
| 76 | + "defaultValue": "[coalesce(parameters('standard').masterSqlDatabaseName, concat(parameters('deploymentId'), '-master-db'))]" |
| 77 | + }, |
| 78 | + |
| 79 | + "cmWebAppName": { |
| 80 | + "type": "string", |
| 81 | + "defaultValue": "[coalesce(parameters('standard').cmWebAppName, concat(parameters('deploymentId'), '-cm'))]" |
| 82 | + }, |
| 83 | + "cdWebAppName": { |
| 84 | + "type": "string", |
| 85 | + "defaultValue": "[coalesce(parameters('standard').cdWebAppName, concat(parameters('deploymentId'), '-cd'))]" |
| 86 | + }, |
| 87 | + |
| 88 | + "cmMsDeployPackageUrl": { |
| 89 | + "type": "securestring", |
| 90 | + "defaultValue": "[parameters('extension').cmMsDeployPackageUrl]" |
| 91 | + }, |
| 92 | + "cdMsDeployPackageUrl": { |
| 93 | + "type": "securestring", |
| 94 | + "defaultValue": "[parameters('extension').cdMsDeployPackageUrl]" |
| 95 | + } |
| 96 | + }, |
| 97 | + "resources": [ |
| 98 | + { |
| 99 | + "name": "[concat(variables('cmWebAppNameTidy'), '/', 'MSDeploy')]", |
| 100 | + "type": "Microsoft.Web/sites/extensions", |
| 101 | + "location": "[parameters('location')]", |
| 102 | + "apiVersion": "[variables('webApiVersion')]", |
| 103 | + "properties": { |
| 104 | + "addOnPackages": [ |
| 105 | + { |
| 106 | + "dbType": "SQL", |
| 107 | + "connectionString": "[concat('Data Source=tcp:', variables('sqlServerFqdnTidy'), ',1433;Initial Catalog=master;User Id=', parameters('sqlServerLogin'), ';Password=', parameters('sqlServerPassword'), ';')]", |
| 108 | + "packageUri": "[parameters('cmMsDeployPackageUrl')]", |
| 109 | + "setParameters": { |
| 110 | + "Application Path": "[variables('cmWebAppNameTidy')]", |
| 111 | + "Core Admin Connection String": "[concat('Encrypt=True;TrustServerCertificate=False;Data Source=', variables('sqlServerFqdnTidy'), ',1433;Initial Catalog=',variables('coreSqlDatabaseNameTidy'),';User Id=', parameters('sqlServerLogin'), ';Password=', parameters('sqlServerPassword'), ';')]", |
| 112 | + "Master Admin Connection String": "[concat('Encrypt=True;TrustServerCertificate=False;Data Source=', variables('sqlServerFqdnTidy'), ',1433;Initial Catalog=',variables('masterSqlDatabaseNameTidy'),';User Id=', parameters('sqlServerLogin'), ';Password=', parameters('sqlServerPassword'), ';')]" |
| 113 | + } |
| 114 | + } |
| 115 | + ] |
| 116 | + } |
| 117 | + }, |
| 118 | + { |
| 119 | + "name": "[concat(variables('cdWebAppNameTidy'), '/', 'MSDeploy')]", |
| 120 | + "type": "Microsoft.Web/sites/extensions", |
| 121 | + "location": "[parameters('location')]", |
| 122 | + "apiVersion": "[variables('webApiVersion')]", |
| 123 | + "properties": { |
| 124 | + "addOnPackages": [ |
| 125 | + { |
| 126 | + "dbType": "SQL", |
| 127 | + "connectionString": "[concat('Data Source=tcp:', variables('sqlServerFqdnTidy'), ',1433;Initial Catalog=master;User Id=', parameters('sqlServerLogin'), ';Password=', parameters('sqlServerPassword'), ';')]", |
| 128 | + "packageUri": "[parameters('cdMsDeployPackageUrl')]", |
| 129 | + "setParameters": { |
| 130 | + "Application Path": "[variables('cdWebAppNameTidy')]" |
| 131 | + } |
| 132 | + } |
| 133 | + ] |
| 134 | + } |
| 135 | + } |
| 136 | + ] |
| 137 | +} |
0 commit comments