File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 78
78
with :
79
79
inlineScript : |
80
80
rg=$(az webapp list --query "[?name=='${{ secrets.AZURE_APP_SERVICE_NAME }}'].resourceGroup" --output tsv)
81
- az webapp config appsettings set -n ${{ secrets.AZURE_APP_SERVICE_NAME }} -g $rg --settings SCM_DO_BUILD_DURING_DEPLOYMENT=false
82
- az webapp config set --startup-file="node server.js" -n ${{ secrets.AZURE_APP_SERVICE_NAME }} -g $rg
81
+ echo Setting SCM_DO_BUILD_DURING_DEPLOYMENT=false on app service ${{ secrets.AZURE_APP_SERVICE_NAME }}
82
+ az webapp config appsettings set -n ${{ secrets.AZURE_APP_SERVICE_NAME }} -g $rg --settings SCM_DO_BUILD_DURING_DEPLOYMENT=false -o none
83
+ echo Setting --startup-file=\"node server.js\" on app service ${{ secrets.AZURE_APP_SERVICE_NAME }}
84
+ az webapp config set --startup-file="node server.js" -n ${{ secrets.AZURE_APP_SERVICE_NAME }} -g $rg -o none
83
85
sleep 10
84
86
85
87
- name : 🚀 Deploy to Azure Web App
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ var appservice_name = toLower('${name}-app-${resourceToken}')
34
34
// keyvault name must be less than 24 chars - token is 13
35
35
var kv_prefix = take (name , 7 )
36
36
var keyVaultName = toLower ('${kv_prefix }-kv-${resourceToken }' )
37
+ var la_workspace_name = toLower ('${name }-la-${resourceToken }' )
38
+ var diagnostic_setting_name = 'AppServiceConsoleLogs'
37
39
38
40
var keyVaultSecretsUserRole = subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , '4633458b-17de-408a-b874-0445c86b69e6' )
39
41
@@ -64,7 +66,6 @@ var deployments = [
64
66
}
65
67
]
66
68
67
-
68
69
resource appServicePlan 'Microsoft.Web/serverfarms@2020-06-01' = {
69
70
name : appservice_name
70
71
location : location
@@ -166,6 +167,26 @@ resource webApp 'Microsoft.Web/sites@2020-06-01' = {
166
167
identity : { type : 'SystemAssigned' }
167
168
}
168
169
170
+ resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' = {
171
+ name : la_workspace_name
172
+ location : location
173
+ }
174
+
175
+ resource webDiagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = {
176
+ name : diagnostic_setting_name
177
+ scope : webApp
178
+ properties : {
179
+ workspaceId : logAnalyticsWorkspace .id
180
+ logs : [
181
+ {
182
+ category : 'AppServiceConsoleLogs'
183
+ enabled : true
184
+ }
185
+ ]
186
+ metrics : []
187
+ }
188
+ }
189
+
169
190
resource kvFunctionAppPermissions 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
170
191
name : guid (kv .id , webApp .name , keyVaultSecretsUserRole )
171
192
scope : kv
You can’t perform that action at this time.
0 commit comments