Skip to content

Commit 567f094

Browse files
Merge pull request #829 from microsoft/dev-v4
chore: Dev v4 to main includes v2 foundry sdk changes
2 parents 0b414ec + da4091a commit 567f094

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1187
-5059
lines changed

infra/main.bicep

Lines changed: 18 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
12881288
}
12891289
{
12901290
name: 'AZURE_AI_SEARCH_ENDPOINT'
1291-
value: searchService.outputs.endpoint
1291+
value: searchServiceUpdate.outputs.endpoint
12921292
}
12931293
{
12941294
name: 'AZURE_COGNITIVE_SERVICES'
@@ -1330,10 +1330,6 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
13301330
name: 'SUPPORTED_MODELS'
13311331
value: '["o3","o4-mini","gpt-4.1","gpt-4.1-mini"]'
13321332
}
1333-
{
1334-
name: 'AZURE_AI_SEARCH_API_KEY'
1335-
secretRef: 'azure-ai-search-api-key'
1336-
}
13371333
{
13381334
name: 'AZURE_STORAGE_BLOB_URL'
13391335
value: avmStorageAccount.outputs.serviceEndpoints.blob
@@ -1369,13 +1365,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
13691365
]
13701366
}
13711367
]
1372-
secrets: [
1373-
{
1374-
name: 'azure-ai-search-api-key'
1375-
keyVaultUrl: keyvault.outputs.secrets[0].uriWithVersion
1376-
identity: userAssignedIdentity.outputs.resourceId
1377-
}
1378-
]
1368+
secrets: []
13791369
}
13801370
}
13811371

@@ -1662,86 +1652,20 @@ var aiSearchIndexNameForRFPSummary = 'macae-rfp-summary-index'
16621652
var aiSearchIndexNameForRFPRisk = 'macae-rfp-risk-index'
16631653
var aiSearchIndexNameForRFPCompliance = 'macae-rfp-compliance-index'
16641654

1665-
module searchService 'br/public:avm/res/search/search-service:0.11.1' = {
1666-
name: take('avm.res.search.search-service.${solutionSuffix}', 64)
1667-
params: {
1668-
name: searchServiceName
1669-
authOptions: {
1670-
aadOrApiKey: {
1671-
aadAuthFailureMode: 'http401WithBearerChallenge'
1672-
}
1673-
}
1674-
disableLocalAuth: false
1675-
hostingMode: 'default'
1676-
1677-
// Enabled the Public access because other services are not able to connect with search search AVM module when public access is disabled
1678-
1679-
// publicNetworkAccess: enablePrivateNetworking ? 'Disabled' : 'Enabled'
1680-
publicNetworkAccess: 'Enabled'
1681-
networkRuleSet: {
1682-
bypass: 'AzureServices'
1683-
}
1684-
partitionCount: 1
1685-
replicaCount: 1
1686-
sku: enableScalability ? 'standard' : 'basic'
1687-
tags: tags
1688-
roleAssignments: [
1689-
{
1690-
principalId: userAssignedIdentity.outputs.principalId
1691-
roleDefinitionIdOrName: 'Search Index Data Contributor'
1692-
principalType: 'ServicePrincipal'
1693-
}
1694-
{
1695-
principalId: deployingUserPrincipalId
1696-
roleDefinitionIdOrName: 'Search Index Data Contributor'
1697-
principalType: deployerPrincipalType
1698-
}
1699-
{
1700-
principalId: aiFoundryAiProjectPrincipalId
1701-
roleDefinitionIdOrName: 'Search Index Data Reader'
1702-
principalType: 'ServicePrincipal'
1703-
}
1704-
{
1705-
principalId: aiFoundryAiProjectPrincipalId
1706-
roleDefinitionIdOrName: 'Search Service Contributor'
1707-
principalType: 'ServicePrincipal'
1708-
}
1709-
]
1710-
1711-
//Removing the Private endpoints as we are facing the issue with connecting to search service while comminicating with agents
1712-
1713-
privateEndpoints: []
1714-
// privateEndpoints: enablePrivateNetworking
1715-
// ? [
1716-
// {
1717-
// name: 'pep-search-${solutionSuffix}'
1718-
// customNetworkInterfaceName: 'nic-search-${solutionSuffix}'
1719-
// privateDnsZoneGroup: {
1720-
// privateDnsZoneGroupConfigs: [
1721-
// {
1722-
// privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.search]!.outputs.resourceId
1723-
// }
1724-
// ]
1725-
// }
1726-
// subnetResourceId: virtualNetwork!.outputs.subnetResourceIds[0]
1727-
// service: 'searchService'
1728-
// }
1729-
// ]
1730-
// : []
1655+
resource searchService 'Microsoft.Search/searchServices@2024-06-01-preview' = {
1656+
name: searchServiceName
1657+
location: location
1658+
sku: {
1659+
name: enableScalability ? 'standard' : 'basic'
17311660
}
17321661
}
17331662

1734-
// Separate module for Search Service to enable managed identity, as this reduces deployment time
1735-
module searchServiceIdentity 'br/public:avm/res/search/search-service:0.11.1' = {
1736-
name: take('avm.res.search.identity.${solutionSuffix}', 64)
1663+
// Separate module for Search Service to enable managed identity and update other properties, as this reduces deployment time
1664+
module searchServiceUpdate 'br/public:avm/res/search/search-service:0.11.1' = {
1665+
name: take('avm.res.search.update.${solutionSuffix}', 64)
17371666
params: {
17381667
name: searchServiceName
1739-
authOptions: {
1740-
aadOrApiKey: {
1741-
aadAuthFailureMode: 'http401WithBearerChallenge'
1742-
}
1743-
}
1744-
disableLocalAuth: false
1668+
disableLocalAuth: true
17451669
hostingMode: 'default'
17461670
managedIdentities: {
17471671
systemAssigned: true
@@ -1817,10 +1741,9 @@ module aiSearchFoundryConnection 'modules/aifp-connections.bicep' = {
18171741
aiFoundryProjectName: aiFoundryAiProjectName
18181742
aiFoundryName: aiFoundryAiServicesResourceName
18191743
aifSearchConnectionName: aiSearchConnectionName
1820-
searchServiceResourceId: searchService.outputs.resourceId
1821-
searchServiceLocation: searchService.outputs.location
1822-
searchServiceName: searchService.outputs.name
1823-
searchApiKey: searchService.outputs.primaryKey
1744+
searchServiceResourceId: searchService.id
1745+
searchServiceLocation: searchService.location
1746+
searchServiceName: searchService.name
18241747
}
18251748
dependsOn: [
18261749
aiFoundryAiServices
@@ -1871,12 +1794,7 @@ module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = {
18711794
roleDefinitionIdOrName: 'Key Vault Administrator'
18721795
}
18731796
]
1874-
secrets: [
1875-
{
1876-
name: 'AzureAISearchAPIKey'
1877-
value: searchService.outputs.primaryKey
1878-
}
1879-
]
1797+
secrets: []
18801798
enableTelemetry: enableTelemetry
18811799
}
18821800
}
@@ -1893,8 +1811,8 @@ output webSiteDefaultHostname string = webSite.outputs.defaultHostname
18931811

18941812
output AZURE_STORAGE_BLOB_URL string = avmStorageAccount.outputs.serviceEndpoints.blob
18951813
output AZURE_STORAGE_ACCOUNT_NAME string = storageAccountName
1896-
output AZURE_AI_SEARCH_ENDPOINT string = searchService.outputs.endpoint
1897-
output AZURE_AI_SEARCH_NAME string = searchService.outputs.name
1814+
output AZURE_AI_SEARCH_ENDPOINT string = searchServiceUpdate.outputs.endpoint
1815+
output AZURE_AI_SEARCH_NAME string = searchService.name
18981816

18991817
output COSMOSDB_ENDPOINT string = 'https://${cosmosDbResourceName}.documents.azure.com:443/'
19001818
output COSMOSDB_DATABASE string = cosmosDbDatabaseName
@@ -1917,7 +1835,7 @@ output AI_FOUNDRY_RESOURCE_ID string = !useExistingAiFoundryAiProject
19171835
? aiFoundryAiServices.outputs.resourceId
19181836
: existingAiFoundryAiProjectResourceId
19191837
output COSMOSDB_ACCOUNT_NAME string = cosmosDbResourceName
1920-
output AZURE_SEARCH_ENDPOINT string = searchService.outputs.endpoint
1838+
output AZURE_SEARCH_ENDPOINT string = searchServiceUpdate.outputs.endpoint
19211839
output AZURE_CLIENT_ID string = userAssignedIdentity!.outputs.clientId
19221840
output AZURE_TENANT_ID string = tenant().tenantId
19231841
output AZURE_AI_SEARCH_CONNECTION_NAME string = aiSearchConnectionName
@@ -1926,7 +1844,6 @@ output REASONING_MODEL_NAME string = aiFoundryAiServicesReasoningModelDeployment
19261844
output MCP_SERVER_NAME string = 'MacaeMcpServer'
19271845
output MCP_SERVER_DESCRIPTION string = 'MCP server with greeting, HR, and planning tools'
19281846
output SUPPORTED_MODELS string = '["o3","o4-mini","gpt-4.1","gpt-4.1-mini"]'
1929-
output AZURE_AI_SEARCH_API_KEY string = '<Deployed-Search-ApiKey>'
19301847
output BACKEND_URL string = 'https://${containerApp.outputs.fqdn}'
19311848
output AZURE_AI_PROJECT_ENDPOINT string = aiFoundryAiProjectEndpoint
19321849
output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiProjectEndpoint

0 commit comments

Comments
 (0)