Skip to content

Latest commit

 

History

History
129 lines (107 loc) · 4.08 KB

File metadata and controls

129 lines (107 loc) · 4.08 KB
title layout nav_order parent
4. Reuse existing resource
default
4
Deploy to Azure automatically

4. Reuse existing resource

The default azd up process will create lots of new resource in the azure cloud.

  • Some creation work may fail due to feature limitations
  • Share resource between users

Here are some topic to reuse some azure resource

{: .note }

  • Reuse resource in same tenant, cross-tenant sharing is not supported.
  • New created resources are in the same resource group, dedicate resource group for different resources are not supported yet.

Here are the steps to reuse some azure resource

  1. Use existing Resource Group

    Get the name or your group, add the info to infra/bicep/main.parameters.json:

         "resourceGroupName": {
             "value": "<group>"
         },
    
  2. Use existing Azure OpenAI instance Locate the OpenAI instance,

    • Make sure you have the User Access Administrator role to the OpenAI instance, the deployment scripts will grant User role to new managed identity to visit this OpenAI, see OpenAI user
    • Create models text-embedding-ada-002 and gpt-4o in this OpenAI instance.

    Get the name, group and subscription info of the existing OpenAI instance, add the info to infra/bicep/main.parameters.json:

         "openAiExisting": {
             "value": true
         },
         "openAiName": {
             "value": "<name>"
         },
         "openAiResourceGroup": {
             "value": "<group>"
         },
         "openAiSubscription": {
             "value": "<subscription>"
         }
    
  3. Use existing Azure Container Registry

    Locate the container registry, make sure you have the User Access Administrator role to the container registry, the deployment scripts will grant AcrPull & AcrPush roles to new managed identities. Get the name, group and subscription info of the existing container registry, add the info to infra/bicep/main.parameters.json:

         "acrExisting": {
             "value": true
         },
         "acrName": {
             "value": "<name>"
         },
         "acrGroupName": {
             "value": "<group>"
         },
         "acrSubscription": {
             "value": "<subscription>"
         },
    
  4. Use existing MySQL flexible server

    Locate the MySQL flexible server, make sure you have the User Access Administrator role to the server, the deployment scripts will grant Admin role to new managed identity. Get the name, group and subscription info of the existing MySQL flexible server, add the info to infra/bicep/main.parameters.json:

         "sqlServerExisting": {
             "value": true
         },
         "sqlServerName": {
             "value": "<name>"
         },
         "sqlServerResourceGroup": {
             "value": "<group>"
         },
         "sqlServerSubscription": {
             "value": "<subscription>"
         },
    
  5. Use existing Log Analytics Workspace Locate the Log Analytics Workspace, get the name, group and subscription info of the existing Log Analytics Workspace, add the info to infra/bicep/main.parameters.json:

         "laWorkspaceExisting": {
             "value": true
         },
         "laWorkspaceName": {
             "value": "<name>"
         },
         "laWorkspaceResourceGroup": {
             "value": "<group>"
         },
         "laWorkspaceSubscription": {
             "value": "<subscription>"
         },
    
  6. Use existing Application Insights Locate the MySQL flexible server, get the name, group and subscription info of the existing Log Analytics Workspace, add the info to infra/bicep/main.parameters.json:

         "appInsightsExisting": {
             "value": true
         },
         "appInsightsName": {
             "value": "<name>"
         },
         "appInsightsResourceGroup": {
             "value": "<group>"
         },
         "appInsightsSubscription": {
             "value": "<subscription>"
         },