File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ module logAnalytics 'core/monitor/loganalytics.bicep' = if (!empty(aiExistingPro
222
222
}
223
223
}
224
224
225
- var hostName = empty (aiExistingProjectConnectionString ) ? split (ai .outputs .discoveryUrl , '/' )[2 ] : ''
225
+ var hostName = empty (aiExistingProjectConnectionString ) && ! empty ( ai . outputs . discoveryUrl ) && contains ( ai . outputs . discoveryUrl , '/' ) ? split (ai .outputs .discoveryUrl , '/' )[2 ] : ''
226
226
var projectConnectionString = empty (hostName )
227
227
? aiExistingProjectConnectionString
228
228
: '${hostName };${subscription ().subscriptionId };${rg .name };${projectName }'
@@ -240,7 +240,7 @@ module monitoringMetricsContribuitorRoleAzureAIDeveloperRG 'core/security/appins
240
240
}
241
241
}
242
242
243
- resource existingProjectRG 'Microsoft.Resources/resourceGroups@2021-04-01' existing = if (!empty (aiExistingProjectConnectionString )) {
243
+ resource existingProjectRG 'Microsoft.Resources/resourceGroups@2021-04-01' existing = if (!empty (aiExistingProjectConnectionString ) && contains ( aiExistingProjectConnectionString , ';' ) ) {
244
244
name : split (aiExistingProjectConnectionString , ';' )[2 ]
245
245
}
246
246
You can’t perform that action at this time.
0 commit comments