Skip to content

Commit

Permalink
fix: remove Form Recognizer (Document Intelligence) resources and par…
Browse files Browse the repository at this point in the history
…ameters (#187)

Co-authored-by: JasonHaley <[email protected]>
  • Loading branch information
JasonHaley and JasonHaley authored Feb 26, 2024
1 parent 655c7da commit 0fec15c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
38 changes: 0 additions & 38 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ param openAiSkuName string = 'S0'
})
param webAppLocation string

param formRecognizerServiceName string = ''
param formRecognizerResourceGroupName string = ''
param formRecognizerResourceGroupLocation string = location

param formRecognizerSkuName string = 'S0'

param chatGptDeploymentName string // Set in main.parameters.json
param chatGptDeploymentCapacity int = 30
param chatGptModelName string // Set in main.parameters.json
Expand Down Expand Up @@ -102,10 +96,6 @@ resource openAiResourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' exi
name: !empty(openAiResourceGroupName) ? openAiResourceGroupName : resourceGroup.name
}

resource formRecognizerResourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' existing = if (!empty(formRecognizerResourceGroupName)) {
name: !empty(formRecognizerResourceGroupName) ? formRecognizerResourceGroupName : resourceGroup.name
}

resource searchServiceResourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' existing = if (!empty(searchServiceResourceGroupName)) {
name: !empty(searchServiceResourceGroupName) ? searchServiceResourceGroupName : resourceGroup.name
}
Expand Down Expand Up @@ -318,20 +308,6 @@ module openAi 'core/ai/cognitiveservices.bicep' = {
}
}

module formRecognizer 'core/ai/cognitiveservices.bicep' = {
name: 'formrecognizer'
scope: formRecognizerResourceGroup
params: {
name: !empty(formRecognizerServiceName) ? formRecognizerServiceName : '${abbrs.cognitiveServicesFormRecognizer}${resourceToken}'
kind: 'FormRecognizer'
location: formRecognizerResourceGroupLocation
tags: tags
sku: {
name: formRecognizerSkuName
}
}
}

module searchService 'core/search/search-services.bicep' = {
name: 'search-service'
scope: searchServiceResourceGroup
Expand Down Expand Up @@ -387,17 +363,6 @@ module openAiRoleUser 'core/security/role.bicep' = if (!isContinuousDeployment)
}
}

module formRecognizerRoleUser 'core/security/role.bicep' = if (!isContinuousDeployment) {
scope: formRecognizerResourceGroup
name: 'formrecognizer-role-user'
params: {
principalId: principalId
// Cognitive Services User
roleDefinitionId: 'a97b65f3-24c7-4388-baec-2e87135dc908'
principalType: 'User'
}
}

module storageContribRoleUser 'core/security/role.bicep' = if (!isContinuousDeployment) {
scope: storageResourceGroup
name: 'storage-contribrole-user'
Expand Down Expand Up @@ -523,9 +488,6 @@ output AZURE_OPENAI_CHATGPT_MODEL string = chatGptModelName
output AZURE_OPENAI_EMBEDDING_DEPLOYMENT string = embeddingDeploymentName
output AZURE_OPENAI_EMBEDDING_MODEL string = embeddingModelName

output AZURE_FORMRECOGNIZER_SERVICE string = formRecognizer.outputs.name
output AZURE_FORMRECOGNIZER_RESOURCE_GROUP string = formRecognizerResourceGroup.name

output AZURE_SEARCH_INDEX string = searchIndexName
output AZURE_SEARCH_SERVICE string = searchService.outputs.name
output AZURE_SEARCH_SERVICE_RESOURCE_GROUP string = searchServiceResourceGroup.name
Expand Down
9 changes: 0 additions & 9 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@
"webAppLocation": {
"value": "${AZURE_WEBAPP_LOCATION=eastus2}"
},
"formRecognizerServiceName": {
"value": "${AZURE_FORMRECOGNIZER_SERVICE}"
},
"formRecognizerResourceGroupName": {
"value": "${AZURE_FORMRECOGNIZER_RESOURCE_GROUP}"
},
"formRecognizerSkuName": {
"value": "S0"
},
"searchIndexName": {
"value": "${AZURE_SEARCH_INDEX=gptkbindex}"
},
Expand Down

0 comments on commit 0fec15c

Please sign in to comment.