forked from glueckkanja/gk-scepman
-
Notifications
You must be signed in to change notification settings - Fork 10
/
appSvcDouble.json
130 lines (130 loc) · 4.3 KB
/
appSvcDouble.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"existingAppServicePlanID": {
"type": "string",
"metadata": {
"description": "Provide the AppServicePlan ID of an existing App Service Plan. Keep default value 'none' if you want to create a new one."
},
"defaultValue": "none"
},
"AppServicePlanName": {
"type": "string",
"metadata": {
"description": "Name of the App Service Plan to be created"
}
},
"appServiceName": {
"type": "string",
"metadata": {
"description": "Name of App Service to be created"
}
},
"appServiceName2": {
"type": "string",
"metadata": {
"description": "Name of second App Service to be created"
}
},
"location": {
"type": "string",
"metadata": {
"description": "Resource Group"
}
},
"resourceTags": {
"type": "object",
"metadata": {
"description": "Tags to be assigned to the created resources"
}
}
},
"resources": [
{
"condition": "[equals(parameters('existingAppServicePlanID'), 'none')]",
"apiVersion": "2022-09-01",
"type": "Microsoft.Web/serverfarms",
"name": "[parameters('AppServicePlanName')]",
"location": "[parameters('location')]",
"sku": {
"Tier": "Standard",
"Name": "S1"
},
"tags": "[parameters('resourceTags')]",
"properties": {
"name": "[parameters('AppServicePlanName')]",
"workerSize": 1,
"numberOfWorkers": 1
}
},
{
"apiVersion": "2022-09-01",
"type": "Microsoft.Web/sites",
"name": "[parameters('appServiceName')]",
"location": "[parameters('location')]",
"identity": {
"type": "SystemAssigned"
},
"tags": "[parameters('resourceTags')]",
"properties": {
"serverFarmId": "[if(equals(parameters('existingAppServicePlanID'), 'none'), resourceId('Microsoft.Web/serverfarms', parameters('AppServicePlanName')), parameters('existingAppServicePlanID'))]",
"clientAffinityEnabled": false,
"httpsOnly": false,
"clientCertEnabled": true,
"clientCertMode": "OptionalInteractiveUser",
"siteConfig": {
"alwaysOn": true,
"http20Enabled": false,
"ftpsState": "Disabled",
"use32BitWorkerProcess": false
}
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('AppServicePlanName'))]"
]
},
{
"apiVersion": "2022-09-01",
"type": "Microsoft.Web/sites",
"name": "[parameters('appServiceName2')]",
"location": "[parameters('location')]",
"identity": {
"type": "SystemAssigned"
},
"tags": "[parameters('resourceTags')]",
"properties": {
"serverFarmId": "[if(equals(parameters('existingAppServicePlanID'), 'none'), resourceId('Microsoft.Web/serverfarms', parameters('AppServicePlanName')), parameters('existingAppServicePlanID'))]",
"clientAffinityEnabled": true,
"httpsOnly": true,
"siteConfig": {
"alwaysOn": true,
"http20Enabled": true,
"ftpsState": "Disabled",
"use32BitWorkerProcess": false
}
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('AppServicePlanName'))]"
]
}
],
"outputs": {
"scepmanURL": {
"type": "string",
"value": "[uri(concat('https://', reference(parameters('appServiceName')).defaultHostName), '/')]"
},
"scepmanPrincipalID": {
"type": "string",
"value": "[reference(parameters('appServiceName'), '2022-03-01', 'Full').identity.principalId]"
},
"certmasterPrincipalID": {
"type": "string",
"value": "[reference(parameters('appServiceName2'), '2022-03-01', 'Full').identity.principalId]"
},
"appServicePlanID": {
"type": "string",
"value": "[if(equals(parameters('existingAppServicePlanID'), 'none'), resourceId('Microsoft.Web/serverfarms', parameters('AppServicePlanName')), parameters('existingAppServicePlanID'))]"
}
}
}