Visual Studio Code Azure



  1. Visual Studio Code Azure Cli
  2. Visual Studio Code Azure Cli
  3. Visual Studio Code Azure Extension
  4. Visual Studio Code Azure Functions

Presently sponsored by: ScriptRunner - Get your free PowerShell Security e-Book!

First, you will need to install Visual Studio Code 1.12.0 or later. To install the extension with the latest version of Visual Studio Code (version 1.13.1 is the latest as of this writing), bring up the Visual Studio Code Command Palette (F1), type install and choose Extensions: Install Extensions. Implement an Azure Resource Manager template by using Visual Studio Code. Declare resources and add flexibility to your template by adding resources, parameters, and outputs.

The Azure CLI is a great way to manage your Azure Resources. I find it convenient, especially during PoC and development efforts, to wire this up to Visual Studio Code.

1. Install the Azure CLI Tools extension in vscode

If you don't already have the Azure CLI installed, you can open the link to the landing page directly from vscode (or use the link above):

Choose your platform and install.

2. Start working with the Azure CLI Tools extension in vscode

Once this extension is installed, it's pretty straight forward to get started. I have a lot of files, configurations and common commands that I run on a daily basis with my production and dev tenants; With the support of vscode and the integrated CLI it's easier to ensure correctness in these commands.

An example: Define an .azcli file

The vscode extension supports the .azcli extension, and if you open a file with this extension inside vscode you'll get all the juice and goodness. Here's an example.

Now we've got intellisense directly from the editor. Neat.

Azure

But it's not only intellisense for the commands, it's intellisense for your actual resources in Azure too - it'll look it up for you while you're typing, so if you're for example trying to execute the get-version command for an AKS cluster, you don't have to by-heart know the full resource group name and cluster name (and the same obviously goes for any resource in Azure):

Visual studio code azure ad

Now, you can chose to run your command in the Terminal or in the Editor. I usually execute it in the Terminal (see the shortcut commands for each in the picture below), but sometimes when I need to grab the JSON result, it is very convenient to run it in the Editor.

Run an azcli command in Terminal

In order to get the output directly in the Terminal, all you'll have to do is to execute the 'Run Line in Terminal' command; Either by using shortcuts or from the menus. Whatever floats your boat.

Great, quick and easy - superb for troubleshooting and I use this a lot.

Run an azcli command in Editor

But, what is this running in Editor thing? Well, I use this when I need to quickly grab the JSON result of my query and use in any documentation, additional configuration files or REST queries I may need to execute using other means.

Choose the other run option to run in Editor, and you'll get a side by side Editor with first the command being executed, and after a few short moments you'll see the result:

Documentation on mouse-over

Visual Studio Code Azure Cli

Simple things made easier: Now you can just mouse-over any element in the file and it'll display the up to date documentation about this command:

That's a wrap for this short tip. I hope you'll find it as beneficial as I am when working with the CLI on a daily basis.

Cheers,
Tobias.

Visual Studio Code Azure

Azure Cache for Redis is a fully managed, open source–compatible in-memory data store to power fast, scalable applications. Use this extension to view the data in your Azure Caches and monitor them at a glance.

Sign up today for your free Azure account and receive 12 months of free popular services, $200 free credit and 25+ always free services 👉 Start Free.

Features

  • View data in your Azure Caches across all your Azure subscriptions
    • Supports clustered and non-clustered caches
    • Supports all Redis data types
  • Filter Redis keys by match expression
  • View cache properties
  • Access primary key and connection string

Installation

  1. Download and install the Azure Cache extension for Visual Studio Code

  2. Once installed, you'll see an Azure icon in the Activity Bar

    If your activity bar is hidden, you won't be able to access the extension. Show the Activity Bar by clicking View > Appearance > Show Activity Bar

  3. Sign in to your Azure Account by clicking Sign in to Azure..

    You may already be signed in if currently use other Azure extensions.

    If you don't already have an Azure Account, click Create a Free Azure Account.. for a free account with $200 in Azure credits to try out any combination of services for 30 days.

View cache data

  1. Expand the subscription tree item to reveal the caches belonging to it.

  2. Expand a cache item to connect to it and see all the DBs with data in them. For a clustered cache, you will see shards instead.

  3. Expand a DB/shard to reveal all the Redis keys under it.

  4. Click on a Redis key name to open its contents in a new editor tab.

    For collection type Redis keys, clicking on it will reveal the individual elements in it. Clicking the individual element will display its contents.

    For string type Redis keys, clicking on it directly reveals the contents in a new tab.

Visual Studio Code Azure Cli

View cache properties

  1. Expand the subscription tree item to reveal the caches belonging to it.

  2. Click on a cache item to see its properties.

Contributing

There are several ways you can contribute to our repo:

  • Ideas, feature requests and bugs: We are open to all ideas and we want to get rid of bugs! Use the Issues section to report a new issue, provide your ideas or contribute to existing threads.
  • Documentation: Found a typo or strangely worded sentences? Submit a PR!
  • Code: Contribute bug fixes, features or design changes. See the wiki for instructions.
Studio

Known Issues

  • Connections to clustered caches do not use SSL due to an ioredis issue.
    • (Connections to non-clustered caches always use SSL.)

Legal

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

Code of Conduct

Visual Studio Code Azure Extension

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. Xerox network & wireless cards driver download for windows.

Trademarks

Visual Studio Code Azure Functions

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

License

The source code in our public repository is licensed under the MIT license and may be locally built and used in accordance with this license.