diff --git a/scripts/deploy/main.bicep b/scripts/deploy/main.bicep index 9ffc3ffba..805a1bf4e 100644 --- a/scripts/deploy/main.bicep +++ b/scripts/deploy/main.bicep @@ -435,6 +435,7 @@ resource appServiceWebDeploy 'Microsoft.Web/sites/extensions@2022-09-01' = if (d } dependsOn: [ appServiceWebConfig + webSubnetConnection ] } @@ -463,7 +464,6 @@ resource appServiceMemoryPipelineConfig 'Microsoft.Web/sites/config@2022-09-01' minTlsVersion: '1.2' netFrameworkVersion: 'v6.0' use32BitWorkerProcess: false - vnetName: webSubnetConnection.name vnetRouteAllEnabled: true appSettings: [ { @@ -623,6 +623,7 @@ resource appServiceMemoryPipelineDeploy 'Microsoft.Web/sites/extensions@2022-09- } dependsOn: [ appServiceMemoryPipelineConfig + memSubnetConnection ] } @@ -883,16 +884,6 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2021-05-01' = { privateLinkServiceNetworkPolicies: 'Enabled' } } - { - name: 'postgresSubnet' - properties: { - addressPrefix: '10.0.3.0/24' - serviceEndpoints: [] - delegations: [] - privateEndpointNetworkPolicies: 'Disabled' - privateLinkServiceNetworkPolicies: 'Enabled' - } - } ] } } @@ -936,6 +927,15 @@ resource webSubnetConnection 'Microsoft.Web/sites/virtualNetworkConnections@2022 } } +resource memSubnetConnection 'Microsoft.Web/sites/virtualNetworkConnections@2022-09-01' = { + parent: appServiceMemoryPipeline + name: 'memSubnetConnection' + properties: { + vnetResourceId: virtualNetwork.properties.subnets[0].id + isSwift: true + } +} + resource qdrantSubnetConnection 'Microsoft.Web/sites/virtualNetworkConnections@2022-09-01' = if (memoryStore == 'Qdrant') { parent: appServiceQdrant name: 'qdrantSubnetConnection' diff --git a/scripts/deploy/main.json b/scripts/deploy/main.json index fed10cac5..ce90ff583 100644 --- a/scripts/deploy/main.json +++ b/scripts/deploy/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.22.6.54827", - "templateHash": "7392657133670008096" + "templateHash": "9623885437439794816" } }, "parameters": { @@ -335,7 +335,8 @@ }, "dependsOn": [ "[resourceId('Microsoft.Web/sites', format('app-{0}-webapi', variables('uniqueName')))]", - "[resourceId('Microsoft.Web/sites/config', format('app-{0}-webapi', variables('uniqueName')), 'web')]" + "[resourceId('Microsoft.Web/sites/config', format('app-{0}-webapi', variables('uniqueName')), 'web')]", + "[resourceId('Microsoft.Web/sites/virtualNetworkConnections', format('app-{0}-webapi', variables('uniqueName')), 'webSubnetConnection')]" ] }, { @@ -369,7 +370,6 @@ "minTlsVersion": "1.2", "netFrameworkVersion": "v6.0", "use32BitWorkerProcess": false, - "vnetName": "webSubnetConnection", "vnetRouteAllEnabled": true, "appSettings": [ { @@ -525,8 +525,7 @@ "[resourceId('Microsoft.Search/searchServices', format('acs-{0}', variables('uniqueName')))]", "[resourceId('Microsoft.CognitiveServices/accounts', format('cog-ocr-{0}', variables('uniqueName')))]", "[resourceId('Microsoft.CognitiveServices/accounts', format('ai-{0}', variables('uniqueName')))]", - "[resourceId('Microsoft.Storage/storageAccounts', format('st{0}', variables('rgIdHash')))]", - "[resourceId('Microsoft.Web/sites/virtualNetworkConnections', format('app-{0}-webapi', variables('uniqueName')), 'webSubnetConnection')]" + "[resourceId('Microsoft.Storage/storageAccounts', format('st{0}', variables('rgIdHash')))]" ] }, { @@ -540,7 +539,8 @@ }, "dependsOn": [ "[resourceId('Microsoft.Web/sites', format('app-{0}-memorypipeline', variables('uniqueName')))]", - "[resourceId('Microsoft.Web/sites/config', format('app-{0}-memorypipeline', variables('uniqueName')), 'web')]" + "[resourceId('Microsoft.Web/sites/config', format('app-{0}-memorypipeline', variables('uniqueName')), 'web')]", + "[resourceId('Microsoft.Web/sites/virtualNetworkConnections', format('app-{0}-memorypipeline', variables('uniqueName')), 'memSubnetConnection')]" ] }, { @@ -836,16 +836,6 @@ "privateEndpointNetworkPolicies": "Disabled", "privateLinkServiceNetworkPolicies": "Enabled" } - }, - { - "name": "postgresSubnet", - "properties": { - "addressPrefix": "10.0.3.0/24", - "serviceEndpoints": [], - "delegations": [], - "privateEndpointNetworkPolicies": "Disabled", - "privateLinkServiceNetworkPolicies": "Enabled" - } } ] }, @@ -899,6 +889,19 @@ "[resourceId('Microsoft.Network/virtualNetworks', format('vnet-{0}', variables('uniqueName')))]" ] }, + { + "type": "Microsoft.Web/sites/virtualNetworkConnections", + "apiVersion": "2022-09-01", + "name": "[format('{0}/{1}', format('app-{0}-memorypipeline', variables('uniqueName')), 'memSubnetConnection')]", + "properties": { + "vnetResourceId": "[reference(resourceId('Microsoft.Network/virtualNetworks', format('vnet-{0}', variables('uniqueName'))), '2021-05-01').subnets[0].id]", + "isSwift": true + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', format('app-{0}-memorypipeline', variables('uniqueName')))]", + "[resourceId('Microsoft.Network/virtualNetworks', format('vnet-{0}', variables('uniqueName')))]" + ] + }, { "condition": "[equals(parameters('memoryStore'), 'Qdrant')]", "type": "Microsoft.Web/sites/virtualNetworkConnections", @@ -1159,4 +1162,4 @@ "value": "[concat(createArray(), if(parameters('deployWebSearcherPlugin'), createArray(format('function-{0}-websearcher-plugin', variables('uniqueName'))), createArray()))]" } } -} +} \ No newline at end of file diff --git a/scripts/deploy/object.txt b/scripts/deploy/object.txt deleted file mode 100644 index 200334167..000000000 --- a/scripts/deploy/object.txt +++ /dev/null @@ -1,94 +0,0 @@ -{ - "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#applications/$entity", - "addIns": [], - "api": { - "acceptMappedClaims": null, - "knownClientApplications": [], - "oauth2PermissionScopes": [], - "preAuthorizedApplications": [], - "requestedAccessTokenVersion": null - }, - "appId": "2e7a7e36-d840-41e2-9cd2-4a7c1c6e2d6d", - "appRoles": [], - "applicationTemplateId": null, - "certification": null, - "createdDateTime": "2023-07-21T17:08:33Z", - "defaultRedirectUri": null, - "deletedDateTime": null, - "description": null, - "disabledByMicrosoftStatus": null, - "displayName": "SemanticKernel-Copilot-Staging", - "groupMembershipClaims": null, - "id": "04a67174-c17f-4f3a-996c-b22517454c71", - "identifierUris": [], - "info": { - "logoUrl": null, - "marketingUrl": null, - "privacyStatementUrl": null, - "supportUrl": null, - "termsOfServiceUrl": null - }, - "isDeviceOnlyAuthSupported": null, - "isFallbackPublicClient": null, - "keyCredentials": [], - "notes": null, - "optionalClaims": null, - "parentalControlSettings": { - "countriesBlockedForMinors": [], - "legalAgeGroupRule": "Allow" - }, - "passwordCredentials": [], - "publicClient": { - "redirectUris": [] - }, - "publisherDomain": "microsoft.onmicrosoft.com", - "requestSignatureVerification": null, - "requiredResourceAccess": [ - { - "resourceAccess": [ - { - "id": "c71f7111-8e3e-4eb7-b56a-0ce6c2fdfd30", - "type": "Scope" - } - ], - "resourceAppId": "82ee9347-fcb3-49d0-9823-90c173e19952" - }, - { - "resourceAccess": [ - { - "id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d", - "type": "Scope" - } - ], - "resourceAppId": "00000003-0000-0000-c000-000000000000" - } - ], - "samlMetadataUrl": null, - "serviceManagementReference": "05b809ac-318a-4d52-85ff-281458cb5348", - "servicePrincipalLockConfiguration": null, - "signInAudience": "AzureADMyOrg", - "spa": { - "redirectUris": [ - "https://app-copichat-rlvquxqizayf2-webapi.azurewebsites.net", - "https://localhost:40443", - "https://nice-smoke-05abf441e.3.azurestaticapps.net" - ] - }, - "tags": [], - "tokenEncryptionKeyId": null, - "verifiedPublisher": { - "addedDateTime": null, - "displayName": null, - "verifiedPublisherId": null - }, - "web": { - "homePageUrl": null, - "implicitGrantSettings": { - "enableAccessTokenIssuance": true, - "enableIdTokenIssuance": true - }, - "logoutUrl": null, - "redirectUriSettings": [], - "redirectUris": [] - } -}