Skip to content

Commit 673a96c

Browse files
authored
Add app settings required for MI other triggers (#4498)
1 parent 03cb3f9 commit 673a96c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/utils/managedIdentityUtils.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { type NameValuePair } from "@azure/arm-appservice";
7+
import { nonNullValueAndProp } from "@microsoft/vscode-azext-utils";
78
import { type IFunctionAppWizardContext } from "../commands/createFunctionApp/IFunctionAppWizardContext";
89
import { ConnectionKey } from "../constants";
910

@@ -23,6 +24,14 @@ export function createAzureWebJobsStorageManagedIdentitySettings(context: IFunct
2324
name: `${ConnectionKey.Storage}__tableServiceUri`,
2425
value: `https://${storageAccountName}.table.core.windows.net`
2526
});
27+
appSettings.push({
28+
name: `${ConnectionKey.Storage}__clientId`,
29+
value: nonNullValueAndProp(context.managedIdentity, 'clientId')
30+
});
31+
appSettings.push({
32+
name: `${ConnectionKey.Storage}__credential`,
33+
value: 'managedIdentity'
34+
});
2635
}
2736

2837
return appSettings;

0 commit comments

Comments
 (0)