File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,16 @@ param replicaCount int = 1
3636])
3737param semanticSearch string = 'disabled'
3838
39+ var searchIdentityProvider = (sku .name == 'free' ) ? null : {
40+ type : 'SystemAssigned'
41+ }
42+
3943resource search 'Microsoft.Search/searchServices@2021-04-01-preview' = {
4044 name : name
4145 location : location
4246 tags : tags
4347 // The free tier does not support managed identity
44- identity : (sku .name == 'free' ) ? null : {
45- type : 'SystemAssigned'
46- }
48+ identity : searchIdentityProvider
4749 properties : {
4850 authOptions : authOptions
4951 disableLocalAuth : disableLocalAuth
@@ -62,4 +64,4 @@ resource search 'Microsoft.Search/searchServices@2021-04-01-preview' = {
6264output id string = search .id
6365output endpoint string = 'https://${name }.search.windows.net/'
6466output name string = search .name
65- output principalId string = ( sku . name == 'free' ) ? '' : search .identity .principalId
67+ output principalId string = ! empty ( searchIdentityProvider ) ? search .identity .principalId : ''
You can’t perform that action at this time.
0 commit comments