I've developed a time triggered function in Microsoft Azure Functions with my personal subscription. The process made me create everything I needed from scratch in Visual Studio Code.
Now I would like to deploy the same function on a different subscription in which someone else have created a resource group, a function app and a storage account. I'm not able to add these existing resources. Looks like from inside Visual Sudio Code I can only create a new resource group, storage account and function app in the same subscription as before even though I've signed out with my personal account and logged into the customer provided account.
Am I missing something obvious? Can someone point me in the right direction?
CodePudding user response:
In Visual Studio Code you can select the Azure Subscription to which deploy your functions by opening the Azure tab on the left side menu (or Alt Shift A shortcut) and by clicking the "Select subscription" button under the "Functions" tab of that menu (see screenshot below).
CodePudding user response:
If your account has multiple subscriptions, then click this icon to select the other subscription where you need to deploy your function app or any other app as you can see in the below image:
even though I've signed out with my personal account and logged into the customer-provided account.
If the customer's subscription is available in your account, though you logged out from the account, it may have shown your subscriptions at the azure extension.
Press Ctrl Shift P in your VS Code, which opens the command palette.
Click on Azure: Sign Out for complete sign out in VS Code.
If you signed in again to the VS Code through Command Palette or Account extension on the sidebar, sync will not happen automatically. So, Click on Sign in to Sync settings which logs you to your Microsoft account to verify again.
Make sure this setting is turned on whichever the account (Customer's or Your Subscription) you logged in to VS Code.
This setting helps you to deploy your applications with any subscription in your account through the VS Code Editor.