Skip to content

Commit

Permalink
updated secrets to use an empty value even if form recogniser and spe…
Browse files Browse the repository at this point in the history
…ech services are not deployed
  • Loading branch information
FreddyAyala committed Jan 4, 2024
1 parent 4d202ec commit decbeef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions infra/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.24.24.22086",
"templateHash": "18294787554343767545"
"templateHash": "17404079927436384388"
}
},
"parameters": {
Expand Down Expand Up @@ -199,7 +199,7 @@
"_generator": {
"name": "bicep",
"version": "0.24.24.22086",
"templateHash": "6778722095658367123"
"templateHash": "8383269400529309964"
}
},
"parameters": {
Expand Down Expand Up @@ -361,7 +361,7 @@
"name": "[format('{0}/{1}', variables('keyVaultName'), 'AZURE-DOCUMENT-INTELLIGENCE-KEY')]",
"properties": {
"contentType": "text/plain",
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('form_recognizer_name')), '2023-05-01').key1]"
"value": "[coalesce(listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('form_recognizer_name')), '2023-05-01').key1, '')]"
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', variables('form_recognizer_name'))]",
Expand All @@ -374,7 +374,7 @@
"name": "[format('{0}/{1}', variables('keyVaultName'), 'AZURE-SPEECH-KEY')]",
"properties": {
"contentType": "text/plain",
"value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('speech_service_name')), '2023-05-01').key1]"
"value": "[coalesce(listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('speech_service_name')), '2023-05-01').key1, '')]"
},
"dependsOn": [
"[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]",
Expand Down
14 changes: 7 additions & 7 deletions infra/resources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,17 @@ resource kv 'Microsoft.KeyVault/vaults@2021-06-01-preview' = {
name: 'AZURE-DOCUMENT-INTELLIGENCE-KEY'
properties: {
contentType: 'text/plain'
value: formRecognizer.listKeys().key1
value: formRecognizer.listKeys().key1 ?? ''
}
}

resource AZURE_SPEECH_KEY 'secrets' = {
name: 'AZURE-SPEECH-KEY'
properties: {
contentType: 'text/plain'
value: speechService.listKeys().key1
resource AZURE_SPEECH_KEY 'secrets' = {
name: 'AZURE-SPEECH-KEY'
properties: {
contentType: 'text/plain'
value: speechService.listKeys().key1 ?? ''
}
}
}


resource AZURE_SEARCH_API_KEY 'secrets' = {
Expand Down

0 comments on commit decbeef

Please sign in to comment.