44 *--------------------------------------------------------------------------------------------*/
55
66import { type Site , type WebSiteManagementClient } from '@azure/arm-appservice' ;
7- import { type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice' ;
87import { SubscriptionTreeItemBase , uiUtils } from '@microsoft/vscode-azext-azureutils' ;
98import { AzureWizard , parseError , type AzExtTreeItem , type IActionContext , type ICreateChildImplContext } from '@microsoft/vscode-azext-utils' ;
109import { type WorkspaceFolder } from 'vscode' ;
10+ import { type IFunctionAppWizardContext } from '../commands/createFunctionApp/IFunctionAppWizardContext' ;
1111import { createCreateFunctionAppComponents } from '../commands/createFunctionApp/createCreateFunctionAppComponents' ;
1212import { projectLanguageSetting } from '../constants' ;
1313import { ext } from '../extensionVariables' ;
@@ -87,7 +87,7 @@ export class SubscriptionTreeItem extends SubscriptionTreeItemBase {
8787 const registerProvidersTask = registerProviders ( context , subscription ) ;
8888 const { wizardContext, promptSteps, executeSteps } = await createCreateFunctionAppComponents ( context , subscription . subscription , language )
8989 const title : string = localize ( 'functionAppCreatingTitle' , 'Create new Function App in Azure' ) ;
90- const wizard : AzureWizard < IAppServiceWizardContext > = new AzureWizard ( wizardContext , {
90+ const wizard : AzureWizard < IFunctionAppWizardContext > = new AzureWizard ( wizardContext , {
9191 promptSteps,
9292 executeSteps,
9393 title,
@@ -99,6 +99,9 @@ export class SubscriptionTreeItem extends SubscriptionTreeItemBase {
9999 // if the providers aren't registered yet, await it here because it is required by this point
100100 await registerProvidersTask ;
101101 wizardContext . activityTitle = localize ( 'functionAppCreateActivityTitle' , 'Create Function App "{0}"' , nonNullProp ( wizardContext , 'newSiteName' ) )
102+ // only disable shared key access if the user is using a managed identity and a flex consumption plan since other app service plans
103+ // and containerized function still rely on connection strings
104+ wizardContext . disableSharedKeyAccess = wizardContext . useManagedIdentity && wizardContext . useFlexConsumptionPlan ;
102105 await wizard . execute ( ) ;
103106
104107 let node : SlotTreeItem | ContainerTreeItem ;
0 commit comments