Exercise – Create an Azure Resource
In this exercise, you will use the Azure portal to create a resource.
The goal is to observe how Azure resource groups are populated with the resources you create.
Important
You have the option to create a resource group when creating the virtual machine.
If you give the resource group the recommended name, it will make cleanup easier at the end of the exercise.
Task 1: Create a Virtual Machine
In this task, you will create a virtual machine using the Azure portal.
- Sign in to the Azure portal.
- Select Create a resource > Compute > Virtual machine > Create.
The Create a virtual machine panel opens on the Basics tab. - Verify or enter the following values for each setting.
If a setting is not specified, leave the default value.
| Setting | Value |
|---|---|
| Subscription | Select the subscription you want to use for the exercise. |
| Resource group | Select Create new, enter IntroAzureRG, then click OK. |
| Virtual machine name | my-VM |
| Region | Leave default |
| Availability options | Leave default |
| Zone options | Manually selected zone |
| Availability zone | Leave default |
| Security type | Leave default |
| Image | Leave default |
| VM architecture | Leave default |
| Enable Azure Spot discount | Unchecked |
| Size | Leave default |
| Authentication type | Password |
| Username | azureuser |
| Password | Enter a custom password |
| Confirm password | Re-enter the custom password |
| Public inbound ports | None |
- Select Review + Create.
Important
The product details will include a cost associated with creating the virtual machine. This is a system function.
If you create the VM in the Learn sandbox environment, you will not incur any real charges.
- Select Create.
- Wait while the virtual machine is provisioned.
The message Deployment in progress will change to Deployment succeeded once the VM is ready.
Task 2: Verify the Created Resources
Once the deployment is complete, you can verify that Azure has created not only a virtual machine but also all the associated resources required for it to function.
- Select Home.
- Under Azure Services, select Resource groups.
- Select the resource group IntroAzureRG.
- You should see a list of resources in this group.
These resources were automatically created when the virtual machine was created.
By default, Azure assigns similar names to make association easier and groups them in the same resource group.
🎉 Congratulations!
You have created a resource in Azure and learned how resources are grouped when they are created.
Cleanup
To delete the items created in this exercise and avoid unnecessary costs, delete the resource group (along with all associated resources).
- From the Azure home page, under Azure Services, select Resource groups.
- Select the resource group IntroAzureRG.
- Select Delete resource group.
- Enter IntroAzureRG to confirm deletion, then select Delete.