As you may know, I am a huge fan of the Azure Cloud Shell. I use it often directly in the Azure Portal, on Microsoft Docs, in the Azure Mobile App or on shell.azure.com. A lot of times I am editing files and writing code and Azure Resource Manager (ARM) templates in Visual Studio Code and in that case I need to either use a local Azure PowerShell or Azure CLI installation or switch from Visual Studio Code back in the browser to use Cloud Shell. However, there is also a third option, which allows me to run Cloud Shell directly within Visual Studio Code.
To set up Cloud Shell in Visual Studio Code you need to do two things. First, you need to install nodeJS and the Azure Account extension.
Next, you can log in to Azure and open PowerShell or Bash in Cloud Shell:
- PressCTRL+SHIFT+P
- Sign in to Microsoft Azure, by typingAzure: Sign In
- Abrowser windowwill open to login to Azure
- PressCTRL+ SHIFT+P
- TypeOpen PowerShell in Cloud ShellorOpen Bash in Cloud Shell
- This will connect you directly to your Cloud Shell running in Azure.
I hope this gives you an overview of how you can run Cloud Shell directly in Visual Studio Code. If you have any questions, leave a comment.
Related Posts
- What's the difference between Azure roles and Azure AD roles?
- The labyrinth of Azure Infrastructure as Code Tools – Azure Spring Clean
- Microsoft Azure Hub-Spoke model by Enterprise Design 1 of 4 Azure Cloud
- Managing and Working with #Azure Network Security Groups (NSG) #Security #IaC #AzureDevOps
- Happy to announce my newest Azure book got (self) published
