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
36
36
])
37
37
param semanticSearch string = 'disabled'
38
38
39
+ var searchIdentityProvider = (sku .name == 'free' ) ? null : {
40
+ type : 'SystemAssigned'
41
+ }
42
+
39
43
resource search 'Microsoft.Search/searchServices@2021-04-01-preview' = {
40
44
name : name
41
45
location : location
42
46
tags : tags
43
47
// The free tier does not support managed identity
44
- identity : (sku .name == 'free' ) ? null : {
45
- type : 'SystemAssigned'
46
- }
48
+ identity : searchIdentityProvider
47
49
properties : {
48
50
authOptions : authOptions
49
51
disableLocalAuth : disableLocalAuth
@@ -62,4 +64,4 @@ resource search 'Microsoft.Search/searchServices@2021-04-01-preview' = {
62
64
output id string = search .id
63
65
output endpoint string = 'https://${name }.search.windows.net/'
64
66
output 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