@@ -65,6 +65,18 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = {
65
65
66
66
identity : { type : managedIdentity ? 'SystemAssigned' : 'None' }
67
67
68
+ resource configAppSettings 'config' = {
69
+ name : 'appsettings'
70
+ properties : union (appSettings ,
71
+ {
72
+ SCM_DO_BUILD_DURING_DEPLOYMENT : string (scmDoBuildDuringDeployment )
73
+ ENABLE_ORYX_BUILD : string (enableOryxBuild )
74
+ },
75
+ runtimeName == 'python' ? { PYTHON_ENABLE_GUNICORN_MULTIWORKERS : 'true' } : {},
76
+ !empty (applicationInsightsName ) ? { APPLICATIONINSIGHTS_CONNECTION_STRING : applicationInsights .properties .ConnectionString } : {},
77
+ !empty (keyVaultName ) ? { AZURE_KEY_VAULT_ENDPOINT : keyVault .properties .vaultUri } : {})
78
+ }
79
+
68
80
resource configLogs 'config' = {
69
81
name : 'logs'
70
82
properties : {
@@ -73,6 +85,9 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = {
73
85
failedRequestsTracing : { enabled : true }
74
86
httpLogs : { fileSystem : { enabled : true , retentionInDays : 1 , retentionInMb : 35 } }
75
87
}
88
+ dependsOn : [
89
+ configAppSettings
90
+ ]
76
91
}
77
92
78
93
resource basicPublishingCredentialsPoliciesFtp 'basicPublishingCredentialsPolicies' = {
@@ -90,21 +105,6 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = {
90
105
}
91
106
}
92
107
93
- module config 'appservice-appsettings.bicep' = if (!empty (appSettings )) {
94
- name : '${name }-appSettings'
95
- params : {
96
- name : appService .name
97
- appSettings : union (appSettings ,
98
- {
99
- SCM_DO_BUILD_DURING_DEPLOYMENT : string (scmDoBuildDuringDeployment )
100
- ENABLE_ORYX_BUILD : string (enableOryxBuild )
101
- },
102
- runtimeName == 'python' && appCommandLine == '' ? { PYTHON_ENABLE_GUNICORN_MULTIWORKERS : 'true' } : {},
103
- !empty (applicationInsightsName ) ? { APPLICATIONINSIGHTS_CONNECTION_STRING : applicationInsights .properties .ConnectionString } : {},
104
- !empty (keyVaultName ) ? { AZURE_KEY_VAULT_ENDPOINT : keyVault .properties .vaultUri } : {})
105
- }
106
- }
107
-
108
108
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = if (!(empty (keyVaultName ))) {
109
109
name : keyVaultName
110
110
}
0 commit comments