Building an Event Storage

Let's create a storage account for our main event storage.

Creating a Queue Storage Account

Our event storage will be based on a Queue Storage Account. First, we will create a storage account. We will then add this storage account to the middleware-eg-rg resource as discussed in the previous lesson.

CLI

We will create the middleware-eg-rg resource group with the command we discussed in the previous lesson. If you have already created this resource group, you may skip this step.

This is our command to create a resource group:

New-AzResourceGroup -Name middleware-eg-rg -Location westeurope

Next, to create a storage account, we will use the New-AzStorageAccount command with the following parameters:

  • [-ResourceGroupName] <String>: The resource group we want to create our storage account in.
  • [-Name] <String>: The name of the storage account.
  • [-Location] <String>: This is the server location.
  • [-SkuName] <String>: The type of replication we want.
  • [-Kind] <String>: The tier of storage we want.

This is our command to create the storage account:

New-AzStorageAccount -ResourceGroupName middleware-eg-rg -Name devvmegrid1 -Location westeurope -SkuName Standard_RAGRS -Kind StorageV2

Hit the RUN button to access the terminal. You can run the script with the following command:

pwsh ./usercode/runCode.ps1

Get hands-on with 1200+ tech skills courses.