Create an IoT hub using the Azure IoT Hub extension for Visual Studio Code
This article shows you how to use the Azure IoT Hub extension for Visual Studio Code to create an Azure IoT hub.
We recommend that you use the Azure Az PowerShell module to interact with Azure. See Install Azure PowerShell to get started. To learn how to migrate to the Az PowerShell module, see Migrate Azure PowerShell from AzureRM to Az.
Azure IoT Hub extension installed for Visual Studio Code
An Azure subscription: create a free account before you begin
An Azure resource group: create a resource group in the Azure portal
Create an IoT hub
The following steps show how to create an IoT hub in Visual Studio Code (VS Code):
In VS Code, open the Explorer view.
At the bottom of the Explorer, expand the Azure IoT Hub section.
Select Create IoT Hub from the list in the Azure IoT Hub section.
If you're not signed into Azure, a pop-up notification is shown in the bottom right corner to let you sign in to Azure. Select Sign In and follow the instructions to sign into Azure.
From the command palette at the top of VS Code, select your Azure subscription.
Select your resource group.
Select a region.
Select a pricing tier.
Enter a globally unique name for your IoT hub, and then select the Enter key.
Wait a few minutes until the IoT hub is created and confirmation is displayed in the Output panel.
There is no option to delete your IoT hub in Visual Studio Code, however you can delete your hub in the Azure portal.
Now that you've deployed an IoT hub using the Azure IoT Hub extension for Visual Studio Code, explore these articles: