Skip to content

Commit

Permalink
Merge branch 'master' into CON-2796-Create-version-5-legal-agreement
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Howes committed Jan 4, 2021
2 parents 7216838 + cbd5165 commit b7d9296
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 167 deletions.
145 changes: 84 additions & 61 deletions azure/accounts.template.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"uiAppServiceName": {
"serviceName": {
"type": "string"
},
"resourceEnvironmentName": {
"type": "string"
},
"sharedFrontendAppServicePlanName": {
Expand All @@ -17,27 +20,12 @@
"sharedBackEndSubnetResourceId": {
"type": "string"
},
"sharedAppServicePlanResourceGroup": {
"type": "string"
},
"sharedEnvResourceGroup": {
"type": "string"
},
"sharedServiceBusName": {
"type": "string"
},
"ApiAppServiceName": {
"type": "string"
},
"workerAppServiceName": {
"type": "string"
},
"workerAppServicePlanName": {
"type": "string"
},
"accountsCosmosDbName": {
"type": "string"
},
"ipRangeFilter": {
"type": "string",
"defaultValue": ""
Expand Down Expand Up @@ -102,16 +90,39 @@
},
"subnetDelegations": {
"type": "array"
},
"resourceGroupLocation": {
"type": "string"
},
"tags": {
"type": "object"
}
},
"variables": {
"deploymentUrlBase": "https://raw.githubusercontent.com/SkillsFundingAgency/das-platform-building-blocks/master/templates/"
"deploymentUrlBase": "https://raw.githubusercontent.com/SkillsFundingAgency/das-platform-building-blocks/master/templates/",
"resourceNamePrefix": "[toLower(concat('das-', parameters('resourceEnvironmentName'),'-', parameters('serviceName')))]",
"uiAppServiceName": "[concat(variables('resourceNamePrefix'), 'ui-as')]",
"apiAppServiceName": "[concat(variables('resourceNamePrefix'), 'api-as')]",
"workerAppServiceName": "[concat(variables('resourceNamePrefix'), 'wkr-as')]",
"workerAppServicePlanName": "[concat(variables('resourceNamePrefix'), 'wkr-asp')]",
"resourceGroupName": "[concat(variables('resourceNamePrefix'), '-rg')]",
"cosmosDbName": "[concat(variables('resourceNamePrefix'), '-cdb')]"
},
"resources": [
{
"apiVersion": "2017-08-01",
"apiVersion": "2020-06-01",
"name": "[variables('resourceGroupName')]",
"type": "Microsoft.Resources/resourceGroups",
"location": "[parameters('resourceGroupLocation')]",
"tags": "[parameters('tags')]",
"properties": {
}
},
{
"apiVersion": "2020-06-01",
"name": "UIAppInsights",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('resourceGroupName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
Expand All @@ -120,18 +131,19 @@
},
"parameters": {
"appInsightsName": {
"value": "[parameters('uiAppServiceName')]"
"value": "[variables('uiAppServiceName')]"
},
"attachedService": {
"value": "[parameters('uiAppServiceName')]"
"value": "[variables('uiAppServiceName')]"
}
}
}
},
{
"apiVersion": "2017-08-01",
"apiVersion": "2020-06-01",
"name": "ApiAppInsights",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('resourceGroupName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
Expand All @@ -140,10 +152,10 @@
},
"parameters": {
"appInsightsName": {
"value": "[parameters('ApiAppServiceName')]"
"value": "[variables('apiAppServiceName')]"
},
"attachedService": {
"value": "[parameters('ApiAppServiceName')]"
"value": "[variables('apiAppServiceName')]"
}
}
},
Expand All @@ -152,9 +164,9 @@
},
{
"condition": "[greater(length(parameters('uiCustomHostname')), 0)]",
"apiVersion": "2017-05-10",
"apiVersion": "2020-06-01",
"name": "ui-app-service-certificate",
"resourceGroup": "[parameters('sharedAppServicePlanResourceGroup')]",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
Expand All @@ -171,17 +183,15 @@
},
"keyVaultResourceGroup": {
"value": "[parameters('keyVaultResourceGroupName')]"
},
"serverFarmId": {
"value": "[resourceId(parameters('sharedAppServicePlanResourceGroup'), 'Microsoft.Web/serverfarms', parameters('sharedFrontendAppServicePlanName'))]"
}
}
}
},
{
"apiVersion": "2017-08-01",
"apiVersion": "2020-06-01",
"name": "UIAppService",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('resourceGroupName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
Expand All @@ -190,13 +200,13 @@
},
"parameters": {
"appServiceName": {
"value": "[parameters('uiAppServiceName')]"
"value": "[variables('uiAppServiceName')]"
},
"appServicePlanName": {
"value": "[parameters('sharedFrontendAppServicePlanName')]"
},
"appServicePlanResourceGroup": {
"value": "[parameters('sharedAppServicePlanResourceGroup')]"
"value": "[parameters('sharedEnvResourceGroup')]"
},
"subnetResourceId": {
"value": "[parameters('sharedFrontEndSubnetResourceId')]"
Expand Down Expand Up @@ -249,17 +259,13 @@
"value": "[parameters('appServiceAllowedIPs')]"
}
}
},
"dependsOn": [
"UIAppInsights",
"ui-app-service-certificate"
]
}
},
{
"condition": "[greater(length(parameters('apiCustomHostName')), 0)]",
"apiVersion": "2017-05-10",
"apiVersion": "2020-06-01",
"name": "api-app-service-certificate",
"resourceGroup": "[parameters('sharedAppServicePlanResourceGroup')]",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
Expand All @@ -276,17 +282,15 @@
},
"keyVaultResourceGroup": {
"value": "[parameters('keyVaultResourceGroupName')]"
},
"serverFarmId": {
"value": "[resourceId(parameters('sharedAppServicePlanResourceGroup'), 'Microsoft.Web/serverfarms', parameters('sharedBackendAppServicePlanName'))]"
}
}
}
},
{
"apiVersion": "2017-08-01",
"apiVersion": "2020-06-01",
"name": "ApiAppService",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('resourceGroupName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
Expand All @@ -295,13 +299,13 @@
},
"parameters": {
"appServiceName": {
"value": "[parameters('ApiAppServiceName')]"
"value": "[variables('apiAppServiceName')]"
},
"appServicePlanName": {
"value": "[parameters('sharedBackendAppServicePlanName')]"
},
"appServicePlanResourceGroup": {
"value": "[parameters('SharedAppServicePlanResourceGroup')]"
"value": "[parameters('sharedEnvResourceGroup')]"
},
"subnetResourceId": {
"value": "[parameters('sharedBackEndSubnetResourceId')]"
Expand Down Expand Up @@ -350,17 +354,13 @@
"value": "[parameters('appServiceAllowedIPs')]"
}
}
},
"dependsOn": [
"ApiAppInsights",
"api-app-service-certificate"
]
}
},
{
"apiVersion": "2017-05-10",
"apiVersion": "2020-06-01",
"name": "worker-subnet",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
"properties": {
"mode": "Incremental",
"templateLink": {
Expand All @@ -387,9 +387,10 @@
}
},
{
"apiVersion": "2017-08-01",
"apiVersion": "2020-06-01",
"name": "WorkerAppServicePlan",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('resourceGroupName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
Expand All @@ -398,7 +399,7 @@
},
"parameters": {
"appServicePlanName": {
"value": "[parameters('workerAppServicePlanName')]"
"value": "[variables('workerAppServicePlanName')]"
},
"aspSize": {
"value": "1"
Expand All @@ -413,9 +414,10 @@
}
},
{
"apiVersion": "2017-08-01",
"apiVersion": "2020-06-01",
"name": "WorkerAppService",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('resourceGroupName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
Expand All @@ -424,13 +426,13 @@
},
"parameters": {
"appServiceName": {
"value": "[parameters('workerAppServiceName')]"
"value": "[variables('workerAppServiceName')]"
},
"appServicePlanName": {
"value": "[parameters('workerAppServicePlanName')]"
"value": "[variables('workerAppServicePlanName')]"
},
"appServicePlanResourceGroup": {
"value": "[resourceGroup().name]"
"value": "[variables('resourceGroupName')]"
},
"subnetResourceId": {
"value": "[reference('worker-subnet').outputs.SubnetResourceId.value]"
Expand Down Expand Up @@ -487,9 +489,10 @@
]
},
{
"apiVersion": "2017-05-10",
"apiVersion": "2020-06-01",
"name": "cosmos-db-resources-deployment",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[variables('resourceGroupName')]",
"properties": {
"mode": "Incremental",
"templateLink": {
Expand All @@ -498,7 +501,7 @@
},
"parameters": {
"cosmosDbName": {
"value": "[parameters('accountsCosmosDbName')]"
"value": "[variables('cosmosDbName')]"
},
"cosmosDbType": {
"value": "GlobalDocumentDB"
Expand All @@ -513,7 +516,7 @@
}
},
{
"apiVersion": "2017-05-10",
"apiVersion": "2020-06-01",
"name": "[concat('role-assignments-acc', copyIndex())]",
"type": "Microsoft.Resources/deployments",
"resourceGroup": "[parameters('sharedEnvResourceGroup')]",
Expand Down Expand Up @@ -542,6 +545,26 @@
}
],
"outputs": {
"AccountsResourceGroupName": {
"type": "string",
"value": "[variables('resourceGroupName')]"
},
"AccountsUiAppServiceName": {
"type": "string",
"value": "[variables('uiAppServiceName')]"
},
"AccountsApiAppServiceName": {
"type": "string",
"value": "[variables('apiAppServiceName')]"
},
"AccountsWorkerAppServiceName": {
"type": "string",
"value": "[variables('workerAppServiceName')]"
},
"AccountsCosmosDbName": {
"type": "string",
"value": "[variables('cosmosDbName')]"
},
"AccountsCosmosDbPrimaryMasterKey": {
"type": "string",
"value": "[reference('cosmos-db-resources-deployment').outputs.PrimaryMasterKey.value]"
Expand Down
Loading

0 comments on commit b7d9296

Please sign in to comment.