Skip to content

Commit 8459a99

Browse files
Merge pull request #835 from microsoft/dev
chore: Clean up unused Bicep resources
2 parents 05a6966 + 631ef87 commit 8459a99

3 files changed

Lines changed: 1 addition & 149 deletions

File tree

infra/main.bicep

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ param imageModelChoice string = 'gpt-image-1-mini'
9090
@description('Optional. API version for Azure OpenAI service.')
9191
param azureOpenaiAPIVersion string = '2025-01-01-preview'
9292

93-
@description('Optional. API version for Azure AI Agent service.')
94-
param azureAiAgentApiVersion string = '2025-05-01'
95-
9693
@minValue(10)
9794
@description('Optional. AI model deployment token capacity.')
9895
param gptModelCapacity int = 150
@@ -200,7 +197,6 @@ var replicaLocation = replicaRegionPairs[?resourceGroup().location] ?? secondary
200197

201198
var azureSearchIndex = 'products'
202199
var aiSearchName = 'srch-${solutionSuffix}'
203-
var aiSearchConnectionName = 'foundry-search-connection-${solutionSuffix}'
204200

205201
// Extracts subscription, resource group, and workspace name from the resource ID
206202
var useExistingLogAnalytics = !empty(existingLogAnalyticsWorkspaceId)
@@ -713,27 +709,10 @@ module aiSearch 'br/public:avm/res/search/search-service:0.12.0' = {
713709
}
714710
}
715711

716-
// ========== AI Search Connection to AI Services ========== //
717-
resource aiSearchFoundryConnection 'Microsoft.CognitiveServices/accounts/projects/connections@2025-12-01' = if (!useExistingAiFoundryAiProject) {
718-
name: '${aiFoundryAiServicesResourceName}/${aiFoundryAiProjectResourceName}/${aiSearchConnectionName}'
719-
properties: {
720-
category: 'CognitiveSearch'
721-
target: 'https://${aiSearchName}.search.windows.net'
722-
authType: 'AAD'
723-
isSharedToAll: true
724-
metadata: {
725-
ApiVersion: '2024-05-01-preview'
726-
ResourceId: aiSearch.outputs.resourceId
727-
}
728-
}
729-
dependsOn: [aiFoundryAiServicesProject]
730-
}
731-
732712
// ========== Storage Account ========== //
733713
var storageAccountName = 'st${solutionSuffix}'
734714
var productImagesContainer = 'product-images'
735715
var generatedImagesContainer = 'generated-images'
736-
var dataContainer = 'data'
737716

738717
module storageAccount 'br/public:avm/res/storage/storage-account:0.32.0' = {
739718
name: take('avm.res.storage.storage-account.${storageAccountName}', 64)
@@ -761,10 +740,6 @@ module storageAccount 'br/public:avm/res/storage/storage-account:0.32.0' = {
761740
name: generatedImagesContainer
762741
publicAccess: 'None'
763742
}
764-
{
765-
name: dataContainer
766-
publicAccess: 'None'
767-
}
768743
]
769744
}
770745
roleAssignments: [
@@ -1057,12 +1032,6 @@ output AZURE_COSMOS_CONVERSATIONS_CONTAINER string = cosmosDBConversationsContai
10571032
@description('Contains Resource Group Name')
10581033
output RESOURCE_GROUP_NAME string = resourceGroup().name
10591034

1060-
@description('Contains AI Foundry Name')
1061-
output AI_FOUNDRY_NAME string = aiFoundryAiProjectResourceName
1062-
1063-
@description('Contains AI Foundry RG Name')
1064-
output AI_FOUNDRY_RG_NAME string = aiFoundryAiServicesResourceGroupName
1065-
10661035
@description('Contains AI Foundry Resource ID')
10671036
output AI_FOUNDRY_RESOURCE_ID string = useExistingAiFoundryAiProject ? '' : aiFoundryAiServices!.outputs.resourceId
10681037

@@ -1099,12 +1068,6 @@ output AZURE_ENV_OPENAI_API_VERSION string = azureOpenaiAPIVersion
10991068
@description('Contains OpenAI Resource')
11001069
output AZURE_OPENAI_RESOURCE string = aiFoundryAiServicesResourceName
11011070

1102-
@description('Contains AI Agent Endpoint')
1103-
output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiProjectEndpoint
1104-
1105-
@description('Contains AI Agent API Version')
1106-
output AZURE_AI_AGENT_API_VERSION string = azureAiAgentApiVersion
1107-
11081071
@description('Contains Application Insights Connection String')
11091072
output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = (enableMonitoring && !useExistingLogAnalytics) ? applicationInsights!.outputs.connectionString : ''
11101073

@@ -1114,9 +1077,6 @@ output AZURE_ENV_AI_SERVICE_LOCATION string = azureAiServiceLocation
11141077
@description('Contains Container Instance Name')
11151078
output CONTAINER_INSTANCE_NAME string = containerInstance.outputs.name
11161079

1117-
@description('Contains Container Instance IP Address')
1118-
output CONTAINER_INSTANCE_IP string = containerInstance.outputs.ipAddress
1119-
11201080
@description('Contains Container Instance FQDN (only for non-private networking)')
11211081
output CONTAINER_INSTANCE_FQDN string = enablePrivateNetworking ? '' : containerInstance.outputs.fqdn
11221082

infra/main.json

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.42.1.51946",
9-
"templateHash": "9315041614692254935"
9+
"templateHash": "8605178057902281640"
1010
},
1111
"name": "Intelligent Content Generation Accelerator",
1212
"description": "Solution Accelerator for multimodal marketing content generation using Microsoft Agent Framework.\n"
@@ -132,13 +132,6 @@
132132
"description": "Optional. API version for Azure OpenAI service."
133133
}
134134
},
135-
"azureAiAgentApiVersion": {
136-
"type": "string",
137-
"defaultValue": "2025-05-01",
138-
"metadata": {
139-
"description": "Optional. API version for Azure AI Agent service."
140-
}
141-
},
142135
"gptModelCapacity": {
143136
"type": "int",
144137
"defaultValue": 150,
@@ -302,7 +295,6 @@
302295
"replicaLocation": "[coalesce(tryGet(variables('replicaRegionPairs'), resourceGroup().location), parameters('secondaryLocation'))]",
303296
"azureSearchIndex": "products",
304297
"aiSearchName": "[format('srch-{0}', variables('solutionSuffix'))]",
305-
"aiSearchConnectionName": "[format('foundry-search-connection-{0}', variables('solutionSuffix'))]",
306298
"useExistingLogAnalytics": "[not(empty(parameters('existingLogAnalyticsWorkspaceId')))]",
307299
"useExistingAiFoundryAiProject": "[not(empty(parameters('azureExistingAIProjectResourceId')))]",
308300
"aiFoundryAiServicesResourceGroupName": "[if(variables('useExistingAiFoundryAiProject'), split(parameters('azureExistingAIProjectResourceId'), '/')[4], format('rg-{0}', variables('solutionSuffix')))]",
@@ -376,7 +368,6 @@
376368
"storageAccountName": "[format('st{0}', variables('solutionSuffix'))]",
377369
"productImagesContainer": "product-images",
378370
"generatedImagesContainer": "generated-images",
379-
"dataContainer": "data",
380371
"cosmosDBResourceName": "[format('cosmos-{0}', variables('solutionSuffix'))]",
381372
"cosmosDBDatabaseName": "content_generation_db",
382373
"cosmosDBConversationsContainer": "conversations",
@@ -424,26 +415,6 @@
424415
"existingResourceGroup"
425416
]
426417
},
427-
"aiSearchFoundryConnection": {
428-
"condition": "[not(variables('useExistingAiFoundryAiProject'))]",
429-
"type": "Microsoft.CognitiveServices/accounts/projects/connections",
430-
"apiVersion": "2025-12-01",
431-
"name": "[format('{0}/{1}/{2}', variables('aiFoundryAiServicesResourceName'), variables('aiFoundryAiProjectResourceName'), variables('aiSearchConnectionName'))]",
432-
"properties": {
433-
"category": "CognitiveSearch",
434-
"target": "[format('https://{0}.search.windows.net', variables('aiSearchName'))]",
435-
"authType": "AAD",
436-
"isSharedToAll": true,
437-
"metadata": {
438-
"ApiVersion": "2024-05-01-preview",
439-
"ResourceId": "[reference('aiSearch').outputs.resourceId.value]"
440-
}
441-
},
442-
"dependsOn": [
443-
"aiFoundryAiServicesProject",
444-
"aiSearch"
445-
]
446-
},
447418
"logAnalyticsWorkspace": {
448419
"condition": "[and(parameters('enableMonitoring'), not(variables('useExistingLogAnalytics')))]",
449420
"type": "Microsoft.Resources/deployments",
@@ -27427,10 +27398,6 @@
2742727398
{
2742827399
"name": "[variables('generatedImagesContainer')]",
2742927400
"publicAccess": "None"
27430-
},
27431-
{
27432-
"name": "[variables('dataContainer')]",
27433-
"publicAccess": "None"
2743427401
}
2743527402
]
2743627403
}
@@ -44711,20 +44678,6 @@
4471144678
},
4471244679
"value": "[resourceGroup().name]"
4471344680
},
44714-
"AI_FOUNDRY_NAME": {
44715-
"type": "string",
44716-
"metadata": {
44717-
"description": "Contains AI Foundry Name"
44718-
},
44719-
"value": "[variables('aiFoundryAiProjectResourceName')]"
44720-
},
44721-
"AI_FOUNDRY_RG_NAME": {
44722-
"type": "string",
44723-
"metadata": {
44724-
"description": "Contains AI Foundry RG Name"
44725-
},
44726-
"value": "[variables('aiFoundryAiServicesResourceGroupName')]"
44727-
},
4472844681
"AI_FOUNDRY_RESOURCE_ID": {
4472944682
"type": "string",
4473044683
"metadata": {
@@ -44809,20 +44762,6 @@
4480944762
},
4481044763
"value": "[variables('aiFoundryAiServicesResourceName')]"
4481144764
},
44812-
"AZURE_AI_AGENT_ENDPOINT": {
44813-
"type": "string",
44814-
"metadata": {
44815-
"description": "Contains AI Agent Endpoint"
44816-
},
44817-
"value": "[if(variables('useExistingAiFoundryAiProject'), format('https://{0}.services.ai.azure.com/api/projects/{1}', variables('aiFoundryAiServicesResourceName'), variables('aiFoundryAiProjectResourceName')), reference('aiFoundryAiServicesProject').outputs.apiEndpoint.value)]"
44818-
},
44819-
"AZURE_AI_AGENT_API_VERSION": {
44820-
"type": "string",
44821-
"metadata": {
44822-
"description": "Contains AI Agent API Version"
44823-
},
44824-
"value": "[parameters('azureAiAgentApiVersion')]"
44825-
},
4482644765
"AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING": {
4482744766
"type": "string",
4482844767
"metadata": {
@@ -44844,13 +44783,6 @@
4484444783
},
4484544784
"value": "[reference('containerInstance').outputs.name.value]"
4484644785
},
44847-
"CONTAINER_INSTANCE_IP": {
44848-
"type": "string",
44849-
"metadata": {
44850-
"description": "Contains Container Instance IP Address"
44851-
},
44852-
"value": "[reference('containerInstance').outputs.ipAddress.value]"
44853-
},
4485444786
"CONTAINER_INSTANCE_FQDN": {
4485544787
"type": "string",
4485644788
"metadata": {

infra/main_custom.bicep

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ param imageModelChoice string = 'gpt-image-1-mini'
9191
@description('Optional. API version for Azure OpenAI service.')
9292
param azureOpenaiAPIVersion string = '2025-01-01-preview'
9393

94-
@description('Optional. API version for Azure AI Agent service.')
95-
param azureAiAgentApiVersion string = '2025-05-01'
96-
9794
@minValue(10)
9895
@description('Optional. AI model deployment token capacity.')
9996
param gptModelCapacity int = 150
@@ -209,7 +206,6 @@ var replicaLocation = replicaRegionPairs[?resourceGroup().location] ?? secondary
209206

210207
var azureSearchIndex = 'products'
211208
var aiSearchName = 'srch-${solutionSuffix}'
212-
var aiSearchConnectionName = 'foundry-search-connection-${solutionSuffix}'
213209

214210
// Extracts subscription, resource group, and workspace name from the resource ID
215211
var useExistingLogAnalytics = !empty(existingLogAnalyticsWorkspaceId)
@@ -746,27 +742,10 @@ module aiSearch 'br/public:avm/res/search/search-service:0.12.0' = {
746742
}
747743
}
748744

749-
// ========== AI Search Connection to AI Services ========== //
750-
resource aiSearchFoundryConnection 'Microsoft.CognitiveServices/accounts/projects/connections@2025-12-01' = if (!useExistingAiFoundryAiProject) {
751-
name: '${aiFoundryAiServicesResourceName}/${aiFoundryAiProjectResourceName}/${aiSearchConnectionName}'
752-
properties: {
753-
category: 'CognitiveSearch'
754-
target: 'https://${aiSearchName}.search.windows.net'
755-
authType: 'AAD'
756-
isSharedToAll: true
757-
metadata: {
758-
ApiVersion: '2024-05-01-preview'
759-
ResourceId: aiSearch.outputs.resourceId
760-
}
761-
}
762-
dependsOn: [aiFoundryAiServicesProject]
763-
}
764-
765745
// ========== Storage Account ========== //
766746
var storageAccountName = 'st${solutionSuffix}'
767747
var productImagesContainer = 'product-images'
768748
var generatedImagesContainer = 'generated-images'
769-
var dataContainer = 'data'
770749

771750
module storageAccount 'br/public:avm/res/storage/storage-account:0.32.0' = {
772751
name: take('avm.res.storage.storage-account.${storageAccountName}', 64)
@@ -794,10 +773,6 @@ module storageAccount 'br/public:avm/res/storage/storage-account:0.32.0' = {
794773
name: generatedImagesContainer
795774
publicAccess: 'None'
796775
}
797-
{
798-
name: dataContainer
799-
publicAccess: 'None'
800-
}
801776
]
802777
}
803778
roleAssignments: [
@@ -1157,12 +1132,6 @@ output AZURE_COSMOS_CONVERSATIONS_CONTAINER string = cosmosDBConversationsContai
11571132
@description('Contains Resource Group Name')
11581133
output RESOURCE_GROUP_NAME string = resourceGroup().name
11591134

1160-
@description('Contains AI Foundry Name')
1161-
output AI_FOUNDRY_NAME string = aiFoundryAiProjectResourceName
1162-
1163-
@description('Contains AI Foundry RG Name')
1164-
output AI_FOUNDRY_RG_NAME string = aiFoundryAiServicesResourceGroupName
1165-
11661135
@description('Contains AI Foundry Resource ID')
11671136
output AI_FOUNDRY_RESOURCE_ID string = useExistingAiFoundryAiProject ? '' : aiFoundryAiServices!.outputs.resourceId
11681137

@@ -1199,12 +1168,6 @@ output AZURE_ENV_OPENAI_API_VERSION string = azureOpenaiAPIVersion
11991168
@description('Contains OpenAI Resource')
12001169
output AZURE_OPENAI_RESOURCE string = aiFoundryAiServicesResourceName
12011170

1202-
@description('Contains AI Agent Endpoint')
1203-
output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiProjectEndpoint
1204-
1205-
@description('Contains AI Agent API Version')
1206-
output AZURE_AI_AGENT_API_VERSION string = azureAiAgentApiVersion
1207-
12081171
@description('Contains Application Insights Connection String')
12091172
output AZURE_APPLICATION_INSIGHTS_CONNECTION_STRING string = (enableMonitoring && !useExistingLogAnalytics) ? applicationInsights!.outputs.connectionString : ''
12101173

@@ -1214,9 +1177,6 @@ output AZURE_ENV_AI_SERVICE_LOCATION string = azureAiServiceLocation
12141177
@description('Contains Container Instance Name')
12151178
output CONTAINER_INSTANCE_NAME string = shouldDeployACI ? containerInstance!.name : ''
12161179

1217-
@description('Contains Container Instance IP Address')
1218-
output CONTAINER_INSTANCE_IP string = shouldDeployACI ? containerInstance!.properties.ipAddress.ip : ''
1219-
12201180
@description('Contains Container Instance FQDN (only for non-private networking)')
12211181
output CONTAINER_INSTANCE_FQDN string = (shouldDeployACI && !isPrivateNetworking) ? containerInstance!.properties.ipAddress.fqdn : ''
12221182

0 commit comments

Comments
 (0)