microsoft / vscode-azuretools

Common packages for building Azure extensions for VS Code
MIT License
104 stars 67 forks source link

utils: Add an option to automatically select an `AzureSubscription` by `subscriptionId` #1648

Closed MicroFish91 closed 10 months ago

MicroFish91 commented 10 months ago

Would like to eventually use here: https://github.com/microsoft/vscode-azurecontainerapps/pull/578

Wanted to add the ability to pass an option to subscriptionExperience to automatically select by subscriptionId without having to re-prompt the user.

Example:

const subscription: AzureSubscription = await subscriptionExperience(context, ext.rgApiV2.resources.azureResourceTreeDataProvider, {
        selectSubscriptionById: '<insert subscriptionId>'
});