|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | | -import { ContainerApp, KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; |
| 6 | +import { ContainerApp, ContainerAppsAPIClient, KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; |
7 | 7 | import { VerifyProvidersStep } from "@microsoft/vscode-azext-azureutils"; |
8 | 8 | import { AzureWizard, AzureWizardExecuteStep, AzureWizardPromptStep, createSubscriptionContext, ITreeItemPickerContext } from "@microsoft/vscode-azext-utils"; |
9 | 9 | import { MessageItem, ProgressLocation, window } from "vscode"; |
10 | 10 | import { acrDomain, webProvider } from "../../constants"; |
11 | 11 | import { ext } from "../../extensionVariables"; |
12 | 12 | import { ContainerAppItem, getContainerEnvelopeWithSecrets, refreshContainerApp } from "../../tree/ContainerAppItem"; |
| 13 | +import { createContainerAppsAPIClient } from '../../utils/azureClients'; |
13 | 14 | import { localize } from "../../utils/localize"; |
14 | 15 | import { pickContainerApp } from "../../utils/pickContainerApp"; |
15 | 16 | import { EnvironmentVariablesListStep } from "../createContainerApp/EnvironmentVariablesListStep"; |
@@ -88,6 +89,8 @@ export async function deployImage(context: ITreeItemPickerContext & Partial<IDep |
88 | 89 | await ext.state.runWithTemporaryDescription(containerApp.id, localize('creating', 'Creating...'), async () => { |
89 | 90 | await window.withProgress({ location: ProgressLocation.Notification, title: creatingRevision }, async (): Promise<void> => { |
90 | 91 | ext.outputChannel.appendLog(creatingRevision); |
| 92 | + const appClient: ContainerAppsAPIClient = await createContainerAppsAPIClient(wizardContext); |
| 93 | + await appClient.containerApps.beginCreateOrUpdateAndWait(containerApp.resourceGroup, containerApp.name, containerAppEnvelope); |
91 | 94 | const updatedContainerApp = await ContainerAppItem.Get(context, subscription, containerApp.resourceGroup, containerApp.name); |
92 | 95 | void showContainerAppCreated(updatedContainerApp, true); |
93 | 96 | }); |
|
0 commit comments