Skip to content

Commit ac6b2af

Browse files
Built the main.json and removed commented code
1 parent 4ffbdd6 commit ac6b2af

File tree

6 files changed

+15
-325
lines changed

6 files changed

+15
-325
lines changed

infra/deploy_ai_foundry.bicep

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ param existingLogAnalyticsWorkspaceId string = ''
1515
var abbrs = loadJsonContent('./abbreviations.json')
1616

1717
var aiFoundryName = '${abbrs.ai.aiFoundry}${solutionName}'
18-
// var aiServicesName_m = '${solutionName}-aiservices_m'
19-
// var location_m = solutionLocation
2018
var applicationInsightsName = '${abbrs.managementGovernance.applicationInsights}${solutionName}'
2119
var keyvaultName = '${abbrs.security.keyVault}${solutionName}'
2220
var location = solutionLocation //'eastus2'
@@ -114,7 +112,6 @@ resource aiFoundryProject 'Microsoft.CognitiveServices/accounts/projects@2025-04
114112
parent: aiFoundry
115113
name: aiProjectName
116114
location: location
117-
// kind: 'AIServices'
118115
identity: {
119116
type: 'SystemAssigned'
120117
}
@@ -214,7 +211,6 @@ resource azureOpenAIEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-
214211
}
215212
}
216213

217-
218214
resource azureSearchAdminKeyEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
219215
parent: keyVault
220216
name: 'AZURE-SEARCH-KEY'

infra/deploy_app_service.bicep

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -321,18 +321,6 @@ resource Website 'Microsoft.Web/sites@2020-06-01' = {
321321
dependsOn: [HostingPlan]
322322
}
323323

324-
// resource ApplicationInsights 'Microsoft.Insights/components@2020-02-02' = {
325-
// name: ApplicationInsightsName
326-
// location: resourceGroup().location
327-
// tags: {
328-
// 'hidden-link:${resourceId('Microsoft.Web/sites',ApplicationInsightsName)}': 'Resource'
329-
// }
330-
// properties: {
331-
// Application_Type: 'web'
332-
// }
333-
// kind: 'web'
334-
// }
335-
336324
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' existing = {
337325
name: AZURE_COSMOSDB_ACCOUNT
338326
}

infra/main.bicep

Lines changed: 0 additions & 279 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,6 @@ var solutionLocation = empty(AZURE_LOCATION) ? resourceGroup().location : AZURE_
6262
var uniqueId = toLower(uniqueString(environmentName, subscription().id, solutionLocation))
6363
var solutionPrefix = 'dg${padLeft(take(uniqueId, 12), 12, '0')}'
6464

65-
// var baseUrl = 'https://raw.githubusercontent.com/microsoft/document-generation-solution-accelerator/main/'
66-
67-
// var ApplicationInsightsName ='${abbrs.managementGovernance.applicationInsights}${solutionPrefix}'
68-
// var WorkspaceName = '${abbrs.managementGovernance.logAnalyticsWorkspace}${solutionPrefix}'
69-
70-
// var useExisting = !empty(existingLogAnalyticsWorkspaceId)
71-
// var existingLawResourceGroup = useExisting ? split(existingLogAnalyticsWorkspaceId, '/')[4] : ''
72-
// var existingLawName = useExisting ? split(existingLogAnalyticsWorkspaceId, '/')[8] : ''
73-
7465

7566
// ========== Managed Identity ========== //
7667
module managedIdentityModule 'deploy_managed_identity.bicep' = {
@@ -129,250 +120,12 @@ module storageAccount 'deploy_storage_account.bicep' = {
129120
}
130121

131122

132-
// resource AzureOpenAIResource_resource 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
133-
// name: AzureOpenAIResource
134-
// location: resourceGroup().location
135-
// kind: 'OpenAI'
136-
// sku: {
137-
// name: 'S0'
138-
// }
139-
// properties: {
140-
// customSubDomainName: AzureOpenAIResource
141-
// publicNetworkAccess: 'Enabled'
142-
// }
143-
// }
144-
145-
// resource AzureOpenAIResource_AzureOpenAIModel 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = {
146-
// parent: AzureOpenAIResource_resource
147-
// name: AzureOpenAIModelName
148-
// properties: {
149-
// model: {
150-
// name: AzureOpenAIModel
151-
// version: '2024-05-13'
152-
// format: 'OpenAI'
153-
// }
154-
// }
155-
// sku: {
156-
// name: 'Standard'
157-
// capacity: 20
158-
// }
159-
// }
160-
161-
// resource AzureOpenAIResource_AzureOpenAIEmbedding 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = {
162-
// parent: AzureOpenAIResource_resource
163-
// name: AzureOpenAIEmbeddingName
164-
// properties: {
165-
// model: {
166-
// name: AzureOpenAIEmbeddingModel
167-
// version: '2'
168-
// format: 'OpenAI'
169-
// }
170-
// }
171-
// sku: {
172-
// name: 'Standard'
173-
// capacity: 20
174-
// }
175-
// dependsOn: [
176-
// AzureOpenAIResource_AzureOpenAIModel
177-
// ]
178-
// }
179-
180-
// resource AzureSearchService_resource 'Microsoft.Search/searchServices@2021-04-01-preview' = {
181-
// name: AzureSearchService
182-
// location: resourceGroup().location
183-
// sku: {
184-
// name: 'standard'
185-
// }
186-
// properties: {
187-
// hostingMode: 'default'
188-
// }
189-
// }
190-
191123
//========== Updates to Key Vault ========== //
192124
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
193125
name: aifoundry.outputs.keyvaultName
194126
scope: resourceGroup(resourceGroup().name)
195127
}
196128

197-
198-
// resource Website 'Microsoft.Web/sites@2020-06-01' = {
199-
// name: WebsiteName
200-
// location: resourceGroup().location
201-
// identity: {
202-
// type: 'SystemAssigned'
203-
// }
204-
// properties: {
205-
// serverFarmId: HostingPlanName
206-
// siteConfig: {
207-
// appSettings: [
208-
// {
209-
// name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
210-
// value: reference(ApplicationInsights.id, '2015-05-01').InstrumentationKey
211-
// }
212-
// {
213-
// name: 'AZURE_SEARCH_SERVICE'
214-
// value: aifoundry.outputs.aiSearchService
215-
// }
216-
// {
217-
// name: 'AZURE_SEARCH_INDEX'
218-
// value: AzureSearchIndex
219-
// }
220-
// {
221-
// name: 'AZURE_SEARCH_KEY'
222-
// value:aifoundry.outputs.keyvaultName.
223-
// }
224-
// {
225-
// name: 'AZURE_SEARCH_USE_SEMANTIC_SEARCH'
226-
// value: AzureSearchUseSemanticSearch
227-
// }
228-
// {
229-
// name: 'AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG'
230-
// value: AzureSearchSemanticSearchConfig
231-
// }
232-
// {
233-
// name: 'AZURE_SEARCH_INDEX_IS_PRECHUNKED'
234-
// value: AzureSearchIndexIsPrechunked
235-
// }
236-
// {
237-
// name: 'AZURE_SEARCH_TOP_K'
238-
// value: AzureSearchTopK
239-
// }
240-
// {
241-
// name: 'AZURE_SEARCH_ENABLE_IN_DOMAIN'
242-
// value: AzureSearchEnableInDomain
243-
// }
244-
// {
245-
// name: 'AZURE_SEARCH_CONTENT_COLUMNS'
246-
// value: AzureSearchContentColumns
247-
// }
248-
// {
249-
// name: 'AZURE_SEARCH_FILENAME_COLUMN'
250-
// value: AzureSearchFilenameColumn
251-
// }
252-
// {
253-
// name: 'AZURE_SEARCH_TITLE_COLUMN'
254-
// value: AzureSearchTitleColumn
255-
// }
256-
// {
257-
// name: 'AZURE_SEARCH_URL_COLUMN'
258-
// value: AzureSearchUrlColumn
259-
// }
260-
// {
261-
// name: 'AZURE_OPENAI_GENERATE_SECTION_CONTENT_PROMPT'
262-
// value: azureOpenAiGenerateSectionContentPrompt
263-
// }
264-
// {
265-
// name: 'AZURE_OPENAI_TEMPLATE_SYSTEM_MESSAGE'
266-
// value: azureOpenAiTemplateSystemMessage
267-
// }
268-
// {
269-
// name: 'AZURE_OPENAI_TITLE_PROMPT'
270-
// value: azureOpenAiTitlePrompt
271-
// }
272-
// {
273-
// name: 'AZURE_OPENAI_RESOURCE'
274-
// value: AzureOpenAIResource
275-
// }
276-
// {
277-
// name: 'AZURE_OPENAI_MODEL'
278-
// value: AzureOpenAIModel
279-
// }
280-
// {
281-
// name: 'AZURE_OPENAI_KEY'
282-
// value: listKeys(
283-
// resourceId(
284-
// subscription().subscriptionId,
285-
// resourceGroup().name,
286-
// 'Microsoft.CognitiveServices/accounts',
287-
// AzureOpenAIResource
288-
// ),
289-
// '2023-05-01'
290-
// ).key1
291-
// }
292-
// {
293-
// name: 'AZURE_OPENAI_MODEL_NAME'
294-
// value: AzureOpenAIModelName
295-
// }
296-
// {
297-
// name: 'AZURE_OPENAI_TEMPERATURE'
298-
// value: AzureOpenAITemperature
299-
// }
300-
// {
301-
// name: 'AZURE_OPENAI_TOP_P'
302-
// value: AzureOpenAITopP
303-
// }
304-
// {
305-
// name: 'AZURE_OPENAI_MAX_TOKENS'
306-
// value: AzureOpenAIMaxTokens
307-
// }
308-
// {
309-
// name: 'AZURE_OPENAI_STOP_SEQUENCE'
310-
// value: AzureOpenAIStopSequence
311-
// }
312-
// {
313-
// name: 'AZURE_OPENAI_SYSTEM_MESSAGE'
314-
// value: azureOpenAISystemMessage
315-
// }
316-
// {
317-
// name: 'AZURE_OPENAI_STREAM'
318-
// value: AzureOpenAIStream
319-
// }
320-
// {
321-
// name: 'AZURE_SEARCH_QUERY_TYPE'
322-
// value: AzureSearchQueryType
323-
// }
324-
// {
325-
// name: 'AZURE_SEARCH_VECTOR_COLUMNS'
326-
// value: AzureSearchVectorFields
327-
// }
328-
// {
329-
// name: 'AZURE_SEARCH_PERMITTED_GROUPS_COLUMN'
330-
// value: AzureSearchPermittedGroupsField
331-
// }
332-
// {
333-
// name: 'AZURE_SEARCH_STRICTNESS'
334-
// value: AzureSearchStrictness
335-
// }
336-
// {
337-
// name: 'AZURE_OPENAI_EMBEDDING_NAME'
338-
// value: AzureOpenAIEmbeddingName
339-
// }
340-
// {
341-
// name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
342-
// value: 'true'
343-
// }
344-
// {
345-
// name: 'AZURE_COSMOSDB_ACCOUNT'
346-
// value: CosmosDBName
347-
// }
348-
// {
349-
// name: 'AZURE_COSMOSDB_DATABASE'
350-
// value: cosmosdb_database_name
351-
// }
352-
// {
353-
// name: 'AZURE_COSMOSDB_CONVERSATIONS_CONTAINER'
354-
// value: cosmosdb_container_name
355-
// }
356-
// {
357-
// name: 'UWSGI_PROCESSES'
358-
// value: '2'
359-
// }
360-
// {
361-
// name: 'UWSGI_THREADS'
362-
// value: '2'
363-
// }
364-
// ]
365-
// linuxFxVersion: WebAppImageName
366-
// }
367-
// }
368-
// dependsOn: [
369-
// HostingPlan
370-
// AzureOpenAIResource_resource
371-
// AzureSearchService_resource
372-
// [keyVault]
373-
// ]
374-
// }
375-
376129
//========== App service module ========== //
377130
module appserviceModule 'deploy_app_service.bicep' = {
378131
name: 'deploy_app_service'
@@ -408,36 +161,6 @@ module appserviceModule 'deploy_app_service.bicep' = {
408161

409162
output WEB_APP_URL string = appserviceModule.outputs.webAppUrl
410163

411-
// resource existingWorkspace 'Microsoft.OperationalInsights/workspaces@2020-08-01' existing = if (useExisting) {
412-
// name: existingLawName
413-
// scope: resourceGroup(existingLawResourceGroup)
414-
// }
415-
416-
// resource Workspace 'Microsoft.OperationalInsights/workspaces@2020-08-01' = if (!useExisting) {
417-
// name: WorkspaceName
418-
// location: solutionLocation
419-
// properties: {
420-
// sku: {
421-
// name: 'PerGB2018'
422-
// }
423-
// retentionInDays: 30
424-
// }
425-
// }
426-
427-
// resource ApplicationInsights 'Microsoft.Insights/components@2020-02-02' = {
428-
// name: ApplicationInsightsName
429-
// location: solutionLocation
430-
// tags: {
431-
// 'hidden-link:${resourceId('Microsoft.Web/sites',ApplicationInsightsName)}': 'Resource'
432-
// }
433-
// properties: {
434-
// Application_Type: 'web'
435-
// WorkspaceResourceId: useExisting ? existingWorkspace.id : Workspace.id
436-
// }
437-
// kind: 'web'
438-
// }
439-
440-
441164
// ========== Cosmos DB module ========== //
442165
module cosmosDBModule 'deploy_cosmos_db.bicep' = {
443166
name: 'deploy_cosmos_db'
@@ -449,8 +172,6 @@ module cosmosDBModule 'deploy_cosmos_db.bicep' = {
449172
}
450173
scope: resourceGroup(resourceGroup().name)
451174
}
452-
// output copykbfiles string = './infra/scripts/copy_kb_files.sh ${storageAccount.outputs.storageName} ${storageAccount.outputs.storageContainer} ${managedIdentityModule.outputs.managedIdentityOutput.clientId}'
453-
// output createindex string = './infra/scripts/run_create_index_scripts.sh ${kvault.outputs.keyvaultName} ${managedIdentityModule.outputs.managedIdentityOutput.clientId}'
454175

455176
output STORAGE_ACCOUNT_NAME string = storageAccount.outputs.storageName
456177
output STORAGE_CONTAINER_NAME string = storageAccount.outputs.storageContainer

0 commit comments

Comments
 (0)