Skip to content

Commit

Permalink
Restructure ARM templates, remove ASE references, add certificate dep…
Browse files Browse the repository at this point in the history
…loyments
  • Loading branch information
EwanNoble committed Jan 9, 2020
1 parent ad39473 commit 40c45b0
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 285 deletions.
165 changes: 131 additions & 34 deletions ....Recruit.Azure.Resources/azuredeploy.json → azure/template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"EnvironmentName": {
Expand All @@ -13,14 +13,6 @@
],
"defaultValue": "West Europe"
},
"aseHostingEnvironmentName": {
"type": "string",
"defaultValue": ""
},
"aseResourceGroup": {
"type": "string",
"defaultValue": ""
},
"webJobAspSize": {
"type": "string",
"allowedValues": [
Expand All @@ -39,7 +31,7 @@
"Standard",
"Premium"
],
"defaultValue": "Standard"
"defaultValue": "Basic"
},
"EnvironmentFullName": {
"type": "string"
Expand Down Expand Up @@ -94,7 +86,7 @@
"ProviderCommitmentsSiteUrl": "",
"SignProviderAgreementUrl": "",
"ReservationsSiteUrl": "",
"EmployerFavouritesUrl": ""
"EmployerFavouritesUrl": ""
}
},
"Features": {
Expand Down Expand Up @@ -127,7 +119,7 @@
"type": "bool",
"defaultValue": false
},
"SharedAppServicePlanName": {
"SharedFrontendAppServicePlanName": {
"type": "string"
},
"SharedAppServicePlanResourceGroup": {
Expand Down Expand Up @@ -250,6 +242,17 @@
},
"containerArray": {
"type": "array"
},
"sharedKeyvaultName": {
"type": "string"
},
"sharedKeyvaultResourceGroup": {
"type": "string"
},
"appServiceAllowedIps": {
"type": "array",
"defaultValue": [
]
}
},
"variables": {
Expand Down Expand Up @@ -282,7 +285,8 @@
}
}
},
"dependsOn": []
"dependsOn": [
]
},
{
"apiVersion": "2017-05-10",
Expand All @@ -303,7 +307,8 @@
}
}
},
"dependsOn": []
"dependsOn": [
]
},
{
"apiVersion": "2017-05-10",
Expand All @@ -324,7 +329,8 @@
}
}
},
"dependsOn": []
"dependsOn": [
]
},
{
"apiVersion": "2017-05-10",
Expand All @@ -351,7 +357,8 @@
}
}
},
"dependsOn": []
"dependsOn": [
]
},
{
"apiVersion": "2017-05-10",
Expand Down Expand Up @@ -456,6 +463,34 @@
"count": "[length(parameters('containerArray'))]"
}
},
{
"condition": "[greater(length(parameters('EmployerCustomHostname')), 0)]",
"apiVersion": "2017-05-10",
"name": "Employer-Recruit-AppService-Certificate",
"resourceGroup": "[parameters('sharedAppServicePlanResourceGroup')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'),'app-service-certificate.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"keyVaultCertificateName": {
"value": "[parameters('EmployerKeyvaultCertificateName')]"
},
"keyVaultName": {
"value": "[parameters('sharedKeyvaultName')]"
},
"keyVaultResourceGroup": {
"value": "[parameters('sharedKeyvaultResourceGroup')]"
},
"serverFarmId": {
"value": "[resourceId(parameters('sharedAppServicePlanResourceGroup'), 'Microsoft.Web/serverfarms', parameters('sharedFrontendAppServicePlanName'))]"
}
}
}
},
{
"apiVersion": "2017-05-10",
"name": "Employer-Recruit-AppService",
Expand All @@ -471,7 +506,7 @@
"value": "[variables('EmployerRecruitAppServiceName')]"
},
"appServicePlanName": {
"value": "[parameters('SharedAppServicePlanName')]"
"value": "[parameters('SharedFrontendAppServicePlanName')]"
},
"appServicePlanResourceGroup": {
"value": "[parameters('SharedAppServicePlanResourceGroup')]"
Expand Down Expand Up @@ -537,11 +572,11 @@
{
"name": "ExternalLinks:CommitmentsSiteUrl",
"value": "[parameters('ExternalLinks').CommitmentsSiteUrl]"
},
{
},
{
"name": "ExternalLinks:EmployerFavouritesUrl",
"value": "[parameters('ExternalLinks').EmployerFavouritesUrl]"
},
},
{
"name": "Features:AllowLevyPayingEmployersOnly",
"value": "[parameters('Features').AllowLevyPayingEmployersOnly]"
Expand Down Expand Up @@ -605,15 +640,47 @@
"value": "[parameters('EmployerCustomHostname')]"
},
"certificateThumbprint": {
"value": "[reference(resourceId(parameters('sharedAppServicePlanResourceGroup'), 'Microsoft.Web/certificates', parameters('EmployerKeyvaultCertificateName')), '2016-03-01').Thumbprint]"
"value": "[if(greater(length(parameters('EmployerCustomHostname')), 0), reference('Employer-Recruit-AppService-Certificate', '2018-11-01').outputs.certificateThumbprint.value, '')]"
},
"ipSecurityRestrictions": {
"value": "[parameters('appServiceAllowedIps')]"
}
}
},
"dependsOn": [
"[variables('EmployerRecruitAppServiceName')]",
"[variables('CosmosDbName')]"
"[variables('CosmosDbName')]",
"Employer-Recruit-AppService-Certificate"
]
},
{
"condition": "[greater(length(parameters('QAAppCustomHostname')), 0)]",
"apiVersion": "2017-05-10",
"name": "QA-App-AppService-Certificate",
"resourceGroup": "[parameters('sharedAppServicePlanResourceGroup')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'),'app-service-certificate.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"keyVaultCertificateName": {
"value": "[parameters('QAAppKeyvaultCertificateName')]"
},
"keyVaultName": {
"value": "[parameters('sharedKeyvaultName')]"
},
"keyVaultResourceGroup": {
"value": "[parameters('sharedKeyvaultResourceGroup')]"
},
"serverFarmId": {
"value": "[resourceId(parameters('sharedAppServicePlanResourceGroup'), 'Microsoft.Web/serverfarms', parameters('sharedFrontendAppServicePlanName'))]"
}
}
}
},
{
"apiVersion": "2017-05-10",
"name": "QA-App-AppService",
Expand All @@ -629,7 +696,7 @@
"value": "[variables('QAAppServiceName')]"
},
"appServicePlanName": {
"value": "[parameters('SharedAppServicePlanName')]"
"value": "[parameters('SharedFrontendAppServicePlanName')]"
},
"appServicePlanResourceGroup": {
"value": "[parameters('SharedAppServicePlanResourceGroup')]"
Expand Down Expand Up @@ -744,14 +811,46 @@
"value": "[parameters('QAAppCustomHostname')]"
},
"certificateThumbprint": {
"value": "[reference(resourceId(parameters('sharedAppServicePlanResourceGroup'), 'Microsoft.Web/certificates', parameters('QAAppKeyvaultCertificateName')), '2016-03-01').Thumbprint]"
"value": "[if(greater(length(parameters('EmployerCustomHostname')), 0), reference('QA-App-AppService-Certificate', '2018-11-01').outputs.certificateThumbprint.value, '')]"
},
"ipSecurityRestrictions": {
"value": "[parameters('appServiceAllowedIps')]"
}
}
},
"dependsOn": [
"[variables('QAAppServiceName')]"
"[variables('QAAppServiceName')]",
"QA-App-AppService-Certificate"
]
},
{
"condition": "[greater(length(parameters('ProviderKeyvaultCertificateName')), 0)]",
"apiVersion": "2017-05-10",
"name": "Provider-Recruit-AppService-Certificate",
"resourceGroup": "[parameters('sharedAppServicePlanResourceGroup')]",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('deploymentUrlBase'),'app-service-certificate.json')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"keyVaultCertificateName": {
"value": "[parameters('ProviderKeyvaultCertificateName')]"
},
"keyVaultName": {
"value": "[parameters('sharedKeyvaultName')]"
},
"keyVaultResourceGroup": {
"value": "[parameters('sharedKeyvaultResourceGroup')]"
},
"serverFarmId": {
"value": "[resourceId(parameters('sharedAppServicePlanResourceGroup'), 'Microsoft.Web/serverfarms', parameters('sharedFrontendAppServicePlanName'))]"
}
}
}
},
{
"apiVersion": "2017-05-10",
"name": "Provider-Recruit-AppService",
Expand All @@ -767,7 +866,7 @@
"value": "[variables('ProviderRecruitAppServiceName')]"
},
"appServicePlanName": {
"value": "[parameters('SharedAppServicePlanName')]"
"value": "[parameters('SharedFrontendAppServicePlanName')]"
},
"appServicePlanResourceGroup": {
"value": "[parameters('SharedAppServicePlanResourceGroup')]"
Expand Down Expand Up @@ -925,12 +1024,16 @@
"value": "[parameters('ProviderCustomHostname')]"
},
"certificateThumbprint": {
"value": "[reference(resourceId(parameters('sharedAppServicePlanResourceGroup'), 'Microsoft.Web/certificates', parameters('ProviderKeyvaultCertificateName')), '2016-03-01').Thumbprint]"
"value": "[if(greater(length(parameters('EmployerCustomHostname')), 0), reference('Provider-Recruit-AppService-Certificate', '2018-11-01').outputs.certificateThumbprint.value, '')]"
},
"ipSecurityRestrictions": {
"value": "[parameters('appServiceAllowedIps')]"
}
}
},
"dependsOn": [
"[variables('CosmosDbName')]"
"[variables('CosmosDbName')]",
"Provider-Recruit-AppService-Certificate"
]
},
{
Expand Down Expand Up @@ -969,12 +1072,6 @@
"aspLocation": {
"value": "[parameters('webJobAspLocation')]"
},
"aseHostingEnvironmentName": {
"value": "[parameters('aseHostingEnvironmentName')]"
},
"aseResourceGroup": {
"value": "[parameters('aseResourceGroup')]"
},
"aspSize": {
"value": "[parameters('webJobAspSize')]"
},
Expand Down
17 changes: 3 additions & 14 deletions src/Employer/Employer.sln
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Employer.Web", "Employer.Web\Employer.Web.csproj", "{9C9261F7-B779-4BAC-BFC0-EA63375F718B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "UnitTests\UnitTests.csproj", "{6B9BE737-38C8-46FB-AB78-FF43B4044EF2}"
EndProject
Project("{151D2E53-A2C4-4D7D-83FE-D05416EBD58E}") = "Esfa.Recruit.Azure.Resources", "Esfa.Recruit.Azure.Resources\Esfa.Recruit.Azure.Resources.deployproj", "{D39E21A9-E8C6-461E-87AE-74180559F2A5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "IntegrationTests\IntegrationTests.csproj", "{723ADF83-C33B-49A4-BADC-E0EC1D94CD68}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{784BB04D-CF2D-4160-BC59-657FCB87464E}"
ProjectSection(SolutionItems) = preProject
..\README.md = ..\README.md
..\..\azure\template.json = ..\..\azure\template.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recruit.Vacancies.Client", "..\Shared\Recruit.Vacancies.Client\Recruit.Vacancies.Client.csproj", "{A7DE9840-CA1D-4B8C-BDFB-D67B9AB8B6C0}"
Expand Down Expand Up @@ -55,16 +54,6 @@ Global
{6B9BE737-38C8-46FB-AB78-FF43B4044EF2}.Release|x64.Build.0 = Release|Any CPU
{6B9BE737-38C8-46FB-AB78-FF43B4044EF2}.Release|x86.ActiveCfg = Release|Any CPU
{6B9BE737-38C8-46FB-AB78-FF43B4044EF2}.Release|x86.Build.0 = Release|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Debug|x64.ActiveCfg = Debug|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Debug|x64.Build.0 = Debug|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Debug|x86.ActiveCfg = Debug|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Debug|x86.Build.0 = Debug|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Release|x64.ActiveCfg = Release|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Release|x64.Build.0 = Release|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Release|x86.ActiveCfg = Release|Any CPU
{D39E21A9-E8C6-461E-87AE-74180559F2A5}.Release|x86.Build.0 = Release|Any CPU
{723ADF83-C33B-49A4-BADC-E0EC1D94CD68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{723ADF83-C33B-49A4-BADC-E0EC1D94CD68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{723ADF83-C33B-49A4-BADC-E0EC1D94CD68}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down

This file was deleted.

Loading

0 comments on commit 40c45b0

Please sign in to comment.