Skip to content

Commit

Permalink
added speechservices flag
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddyAyala committed Jan 4, 2024
1 parent 9349161 commit 4d202ec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 2 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ param searchServiceSkuName string = 'standard'
param searchServiceAPIVersion string = '2023-07-01-Preview'

param deployFormRecognizer bool = true
param deploySpeechServices bool = true

param resourceGroupName string = ''

Expand Down Expand Up @@ -72,6 +73,7 @@ module resources 'resources.bicep' = {
searchServiceAPIVersion: searchServiceAPIVersion
location: location
deployFormRecognizer: deployFormRecognizer
deploySpeechServices: deploySpeechServices
}
}

Expand Down
16 changes: 14 additions & 2 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": "11478787983207948460"
"templateHash": "18294787554343767545"
}
},
"parameters": {
Expand Down Expand Up @@ -97,6 +97,10 @@
"type": "bool",
"defaultValue": true
},
"deploySpeechServices": {
"type": "bool",
"defaultValue": true
},
"resourceGroupName": {
"type": "string",
"defaultValue": ""
Expand Down Expand Up @@ -183,6 +187,9 @@
},
"deployFormRecognizer": {
"value": "[parameters('deployFormRecognizer')]"
},
"deploySpeechServices": {
"value": "[parameters('deploySpeechServices')]"
}
},
"template": {
Expand All @@ -192,7 +199,7 @@
"_generator": {
"name": "bicep",
"version": "0.24.24.22086",
"templateHash": "16531905642071466007"
"templateHash": "6778722095658367123"
}
},
"parameters": {
Expand Down Expand Up @@ -265,6 +272,10 @@
"type": "bool",
"defaultValue": true
},
"deploySpeechServices": {
"type": "bool",
"defaultValue": true
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
Expand Down Expand Up @@ -693,6 +704,7 @@
]
},
{
"condition": "[parameters('deploySpeechServices')]",
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2023-05-01",
"name": "[variables('speech_service_name')]",
Expand Down
4 changes: 2 additions & 2 deletions infra/resources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ param searchServiceIndexName string = 'azure-chat'
param searchServiceAPIVersion string = '2023-07-01-Preview'

param deployFormRecognizer bool = true

param deploySpeechServices bool = true
param location string = resourceGroup().location

@secure()
Expand Down Expand Up @@ -371,7 +371,7 @@ resource deployment 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01
}
}]

resource speechService 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
resource speechService 'Microsoft.CognitiveServices/accounts@2023-05-01' = if (deploySpeechServices) {
name: speech_service_name
location: location
tags: tags
Expand Down

0 comments on commit 4d202ec

Please sign in to comment.