4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
6
import { type Site , type WebSiteManagementClient } from '@azure/arm-appservice' ;
7
- import { type IAppServiceWizardContext } from '@microsoft/vscode-azext-azureappservice' ;
8
7
import { SubscriptionTreeItemBase , uiUtils } from '@microsoft/vscode-azext-azureutils' ;
9
8
import { AzureWizard , parseError , type AzExtTreeItem , type IActionContext , type ICreateChildImplContext } from '@microsoft/vscode-azext-utils' ;
10
9
import { type WorkspaceFolder } from 'vscode' ;
10
+ import { type IFunctionAppWizardContext } from '../commands/createFunctionApp/IFunctionAppWizardContext' ;
11
11
import { createCreateFunctionAppComponents } from '../commands/createFunctionApp/createCreateFunctionAppComponents' ;
12
12
import { projectLanguageSetting } from '../constants' ;
13
13
import { ext } from '../extensionVariables' ;
@@ -87,7 +87,7 @@ export class SubscriptionTreeItem extends SubscriptionTreeItemBase {
87
87
const registerProvidersTask = registerProviders ( context , subscription ) ;
88
88
const { wizardContext, promptSteps, executeSteps } = await createCreateFunctionAppComponents ( context , subscription . subscription , language )
89
89
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 , {
91
91
promptSteps,
92
92
executeSteps,
93
93
title,
@@ -99,6 +99,9 @@ export class SubscriptionTreeItem extends SubscriptionTreeItemBase {
99
99
// if the providers aren't registered yet, await it here because it is required by this point
100
100
await registerProvidersTask ;
101
101
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 ;
102
105
await wizard . execute ( ) ;
103
106
104
107
let node : SlotTreeItem | ContainerTreeItem ;
0 commit comments