GithubHelp home page GithubHelp logo

azure-tools-vscode's Introduction

Azure Tools for Visual Studio Code

This extension for Visual Studio Code gives Azure developers some convenient commands for creating or accessing resources directly in the editor.

New in v 1.2.9

By default the Azure Tools output window is opened on startup. If you prefer that it isn't opened on startup then you can change the azure.showToolsWindowOnStartup setting to false:

Disable tools window on startup

New in v1.2.3

Output window messages

To address the perceived lack of action in the UX during execution we've added a custom Debug Console window that shows the progress of commands executed by the extension. The information in the output window will help customers have more information for error reporting.

Export command

Azure Functions Tools dependency

This release also takes a dependency on the Azure Functions Tools from John Papa that make it easy for you to develop Azure Functions with some handy snippets.

Azure Functions

Misc.

In this release the telemetry-reporting feature has been optimized for better performance and tighter collection.

Previously Released Features

Export Template

In 1.2.0 we've added support for exporting existing resource groups to ARM templates saved in your workspace. First, you invoke the Export command using the palette.

Export command

Then you select an existing resource group.

Select a resource group

A few seconds later, the resource group's contents are downloaded as an ARM template and stored into your current workspace's arm-templates folder.

Export command

Note: As of the 1.2.0 release time frame there are a few kinks in the particular Azure API call we're using; certain details of your resources might not be persisted exactly right. You can use the great features contained in the Azure Resource Manager Tools extension (which bundled with this extension) to make tweaks. The API owners are working on making great improvements to this functionality so it'll improve in future releases of the back-end API.

Azure Batch account creation

From within Visual Studio Code you can use the Create Azure Batch command from the palette, shown below, to create new Azure Batch accounts. Future releases may add support for scripting against your Batch account, creating Jobs, and so forth. Feel free to send the team requests for additional Batch features via our GitHub Issues page.

Create Key Vault

Telemetry Collection

This release introduces the collection of basic usage telemetry. We're using Application Insights to collect and understand how customers are using the extension. To disable the collection of telemetry data simply edit set the azure.enableTelemetry configuration setting to false as shown below.

How to disable usage telemetry

Note: No performance degradation has occurred during this addition, and no private customer information is being persisted. Our telemetry code tracks the name of the call being made (like CreateAppService) and the GUID-based subscription id being affected. We capture the subscription ID so we can understand the frequency of customer usage; the ID can't be used to reversely-identify customers. No customer-identifying data, passwords, connection strings, or resource names are being persisted to our telemetry system.

Features

  • Azure Key Vault Creation
  • Search the Azure QuickStart Templates GitHub repository
  • Download Azure Resource Manager (ARM) template and parameter files to workspace
  • Uses the Azure Resource Manager Tools extension to simplify the template-editing experience
  • ARM template deployment to live Azure subscription
  • Login with Microsoft Account (@hotmail.com, @live.com, etc.)
  • Login with Azure Active Directory (or "Organizational") account
  • Create App Service Web Apps
  • Create App Service Function Apps
  • Create Storage Accounts
  • Get Storage Account connection string
  • Browse to resource in portal
  • Browse to resource group in portal
  • Support for multiple Azure subscriptions
  • Supports all Azure data centers

Each of these commands is visible directly from commands visible in the command palette.

Azure Tools Commands

Azure Key Vault creation

You can now use the Azure Tools for Visual Studio Code to create new Key Vault instances. Selecting the Create Key Vault command. Then you can create a new or select an existing resource group into which your new Key Vault will be created.

Create Key Vault

Azure Resource Manager (ARM) Features

You can use keyword searches to find one of the numerous existing templates in the Azure QuickStart Templates repository, then download the templates you find and deploy them all within Visual Studio Code.

Search and Download from the Azure Template QuickStart Repository

Templates in the QuickStart repository are easily searchable from within Visual Studio Code.

Search for templates

Type in a string or combination of strings for which you're searching:

Search for templates

Select the appropriate template from the resulting list:

Select your template

Note that the templates you select are downloaded into the arm-templates folder in your workspace. This way you can open the parameters file, make changes, and customize your deployment.

Downloaded templates

Now that the Azure Tools for Visual Studio Code takes a dependency on the Azure Resource Manager Tools for Visual Studio Code, editing of ARM templates you download from the repository is easier due to auto-completion, IntelliSense support, and the other ARM editing features provided in the Azure Resource Manager Tools extension.

Deploying Templates

Once you've edited your ARM template you can even use Visual Studio Code to deploy the template and add your Azure resources to your subscription. The Deploy command is visible in the command list below.

Deploy command

The various ARM templates you may have downloaded into your workspace will be shown in a list. This way, if you have multiple resources you wish to deploy in phases or you're just testing various templates out, you can deploy them individually.

Select the template to be deployed

Deployments can be made to new or existing resource groups:

Create new resource group

The status bar shows that the deployment being created:

Deployment happening

In this template scenario a GitHub-backed Web App is created. The portal screenshot below shows how the site is being deployed from GitHub once the template is deployed.

Portal view

Finally, Visual Studio Code provides an update when the deployment has completed.

Deployment complete

Getting Started

Once you've installed the extension you can log in using either your organizational account or a Microsoft account such as a @live.com address. If you need to log in using an "organizationa account" there is no setup work to be done. Simply pull up the command palette and look for the Azure: Login command. This command runs the web-based interactive login process.

Login Command

Logging in with a Microsoft Account?

If you're logging in using a Microsoft account (such as a @hotmail.com, @live.com, or @outlook.com account) you will need to set the azure.tenantId setting. The screenshot below shows this setting being entered using the File -> Preferences -> User Settings feature.

Adding the Azure tenant ID setting

Once you've added the GUID-based setting (available Active Directory area in the classic portal to the user or workspace settings using the azure.tenantId setting you can login using your Microsoft Account. The animated gif below demonstrates the full process of logging in using an MSA.

Signing in using an MSA

Creating Azure Resources

You can use the Azure Tools for Code to create App Service Web and Function Apps, and Azure Storage Accounts (and more resources are on the way). The video embedded below demonstrates using VS Code along with Yeoman templates to create a new Azure Function App.

Create an Azure Function using Code

In the case of Web and Function Apps the Azure Tools Extension allows for creation of your apps using a Simple flow, which creates a resource group, server farm, and app all at once. Or, you can use the Advanced flow to select an existing resource group or server farm in which to create your app.

Creating and Using Storage Accounts

You can also use the Azure Tools for Visual Studio Code to create an Azure Storage Account. In the video below you'll see how you can create a new Storage Account in a new or existing resource group. Then, using the Get Storage Account Connection String command, you can get the connection string for an existing storage account copied to your clipboard. Then, you can easily paste it into a configuration file so your app can store and retrieve data using Azure Storage.

Create an Azure Storage Account using Code

Browsing Resources in the Azure Portal

Two commands are provided to enable easy access to your Azure resources in the portal. By opening the command palette and typing Browse you will see the convenient "Browse in Portal" options.

Browse Commands

You can navigate directly to an individual resource's portal page:

Select a resource

Or to a resource group's portal page:

Select a resource group

Extension Settings

Setting Description
azure.tenantId The GUID specifier for the tenant you intend on authenticating against. This is required if you're attempting to log in using a Microsoft Account like @outlook.com, @hotmail.com, or @live.com.
azure.enableTelemetry To opt out of sending basic usage telemetry set this to false. Default is true.
azure.showToolsWindowOnStartup To prevent the Azure Tools panel showing on startup set this to false. Default is true

Requirements

All dependencies are listed in package.json. You will need an Azure subscription. If you don't yet have an Azure subscription sign up for a free account and then you can make use of the features in this extension, not to mention all the great features Azure offers.

Known Issues

All feature ideas and issues should be reported using GitHub issues.

Release Notes

You can find notes for each release in the changelog.

azure-tools-vscode's People

Contributors

avodovnik avatar bradygaster avatar jawn avatar stuartleeks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

azure-tools-vscode's Issues

status messages should be disposed

I have seen this pattern vscode.window.setStatusBarMessage(constants.statusGettingFarms); in a few places and as quick FYI there is something missing. Our status message actually stack, so to remove them or unset them you should invoke the Disposable the function returns (instead of calling it with the empty string). Alternatively, you pass in a timeout or promise which then also control the lifecycle of the status bar message.

From looking at yours and others extensions I understand that this might be a not so obvious detail of our API and I am happy to hear any kind of feedback.

Add TypeScript typings for intellisense

No, this is not about TypeScript. This is about Typings which can be used to provide intellisense in VSCode for npm libraries. Get your mind blown with this enhancement. No more double guessing. Make VS Code do the hard work for you. PR coming your way :)

Integrate DocumentDB to ATVS

There is no API for creating DocDB Accounts but we can use the API to create Databases/Collections and documents

Another solution would be to create a DocDB account using the REST API. This is a workaround but probably doable since there's already a PoSH cmdlet and an Azure CLI command that can do it. I guess they do they same thing as calling the REST API endpoint to do this.

Open for dicsussion

Finding the instructions a little hard to follow

I'm finding the extension page instructions difficult to follow. I'm not being picky but am not so familiar with everything MS. I am sure others are the same.

  • I'm not using AAD and have no idea at this point what a tenant is or if I use any of @outlook.com, @live.com, or @hotmail.com. I just login to the portal when prompted

  • I assume MSA = Microsoft Account? = @outlook.com, @live.com, or @hotmail.com?

  • The instructions are gif loops which I personally find harder to follow than text. It's not clear where the start of the loop is and they are a bit fast. For accessibility you should provide a text alternative for the gifs.

  • It is of course possible to figure out that we use 'Azure login' in code and that the extension then makes the process really clear. However it should be much easier to get going

  • What is the life time of the login?

  • I do not have the globe region icon in my statusbar. No update is being offered for my extension. I'm in the UK so would like to set the region

Let me know if should pull some of these out into new issues

Add support for incremental mode deployment

In my testing with this extension, I haven't found a way to deploy using incremental mode. Other tools I use for deployment default to incremental mode, but this tool defaults to complete mode, which is not what I normally want. Maybe I'm missing it somewhere?

Update is not available in code UI

I have 0.0.5 installed as show in the installed extension list but I see 0.0.9 is in the market place. however Unlike other extensions I do not get an upgrade offer in the list. Looks like I need to uninstall and re-install.

It seems to be within semver critieria.

Deploying a template results in a error.

I'm trying to deploy just a plain template from the quickstart gallery, but it doesn't work. I'm trying this on a vanilla installation of Windows 10 1607 with either Visual Studio 1.9 or Visual Studio Code insiders.
2017-02-16_21-55-30

'AzureWebJobsStorage' application setting is missing from your app

When creating an Azure Function (Simple) the resulting Function always comes with this error in the portal:

Error:

'AzureWebJobsStorage' application setting is missing from your app. This setting contains a connection string for an Azure Storage account that is needed for the functions runtime to handle multiple instances synchronization, log invocation results, and other infrastructure jobs. Your function app will not work correctly without that setting. Create the app setting with a valid storage connection string.

Nothing works after login

I installed the extension and successfully ran "azure login" command.

After pasting the token into the webpage and selecting my account, VS Code appears to get stuck on "Getting the worldwide data center list"

image

It sits like this indefinitely. So far I can't get any other commands to do anything either.

Version 1.16.1
Commit 27492b6bf3acb0775d82d2f87b25a93490673c6d
Date 2017-09-14T16:38:23.027Z
Shell 1.7.3
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Extension is overriding console... cannot debug other extensions with this one installed

It looks like this extension overloads console. what this means is that if I have this extension installed and I try to debug another extension that uses console.log statements, those statements are not sent to the debug console in vscode.

to repro:

  • install this extension
  • open vs code, open another extension project
  • in that project, put a console.log statement in.
  • F5 to run app, hit code path that executes the console.log statement

Result: no output in VS Code's Debug Console.

  • uninstall this extension, restart VS Code
  • load the extension project again
  • F5 to run, execute code path with console.log

Result: Console log output is in the Debug Console.

Getting a list of resources fails, if not logged in

If you're not logged in, and you click on an operation, e.g. "Browse in portal", it perpetually stays in "Getting your list of resources". I would expect all operations that rely on the token being present, to make sure it's valid at start.

image

Note, I'm probably going to implement a service-wide check for this, with the refactor.

Errors are note taced out

This is probably an enhancement request.

I just installed the extension and was trying to create a function app. Login and selecting subscription seemed to work, but it seemed hung when creating the app.
I checked in the console, and the 401 error returned from Azure is not traced out, instead it just appeared hung.
Now - my problem turned out that I forgot to add the tenantId to the settings. Once I did that and logged in again, it worked.
I think it might be good to have some feedback in the output window when things goes wrong.

notenanttoken

Extend KeyVault functionality

@bradygaster Apart from creating KVs, we should be able to use AVTS to interact with KV data. </Shameless plug> most of the code for this work is here: https://github.com/cmatskas/azure-keyvault-node/blob/master/kvservice.js. I could bring that service in and edit to fit our needs.
Suggested operations:
KV Instance

  • Acquire KV client

Secret Operations

  • Add secret
  • Delete secret
  • Get secret

Key Operations

  • Add key
  • Delete key
  • Encrypt with key
  • Decrypt with key
  • Sign with key

The access token is from the wrong issuer

Error during resource group creation:
Error: The access token is from the wrong issuer 'https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/'. It must match the tenant 'https://sts.windows.net/88d52eb9-4040-4847-b7f2-0d5eeef9cf39/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/88d52eb9-4040-4847-b7f2-0d5eeef9cf39' to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later.

Any idea what's causing this?

Can't login on Windows 10

I have installed Azure CLI 2 on Windows 10 using the MSI as well as the WebPI installer and in WLS for good measure. But when I do Azure Login in the command pallet I get an error message command 'azure.login' not found.

I have a corporate login, but for good measure I added my tenant ID in the settings, but that dint help.

It works great on my Mac. What am I doing wrong?

Escaping a Web app Creation isn't handled properly

Steps to reproduce:

  1. Start creation of a new Web App (Advanced)
  2. Instead of entering a name, leave it empty and press ESC

Expected:

  1. Nothing should happen, the dialog should close.

Actual:

  1. An Error message appears that says "The Web App Name is not available."

image

Selecting the Azure Subscription fails for multiple subscriptions with equal name

I have multiple subscriptions that (for whatever strange reason - namely laziness of their owners) share the same name. When switching subscriptions, it is hard to distinguish between them, and selecting the "second one" doesn't work.

  • Add an ID to the list, so that you can make an educated guess
  • Change the filter logic of the subscription to include the id as well as the name

Connect to Azure, Bad request

I have downloaded visual studio code for mac, I created a new azure function project and I'm trying to connect to azure. It will open up a browser window from visual studio code that refers to https://aka.ms/devicelogin . I have downloaded the microsoft authenticator app for ios.
On https://aka.ms/devicelogin i fill in the code generated bij teh autheticater app. If i use Chrome it doesnt do anything if i hit enter, after typing in the code. So back to Safari and set to default browser. I restart Visual studio code and try to connect to azure again. In Safari it does respond to the enter key but it displays the following:

Sign In
Sorry, but we’re having trouble signing you in.
We received a bad request.

Additional technical information:

Correlation ID: fb01afa7-e48a-4bba-93ea-836b28e0cc0b
Timestamp: 2017-11-25 13:36:37Z
AADSTS90012: This request has timed out

Extension disables intellisense in tsconfig.json and *.ts files

I can't explain this problem, beyond just what I'm seeing happen.

When this extension is enabled, intellisense no longer works for anything *.ts or tsconfig.json. Infact it appears to cause issues with *.json however I haven't done extensive testing.

When I disable this extension, and only this one, I figured the ARM one would have been the culprit, everything starts working as expected again.

Add support for KeyVault

This is a feature request and one that I would personally like to take on. Happy to fork and send a PR for now instead of joining the contributors list (at this point anyway)

Azure Key Vault is fully supported in the .NET SDK and I've done quite a bit of work with it so keen to extend my knowledge and help make this VS Code extension better :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.