0
0
Azurecloud~20 mins

Resource group commands in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Azure Resource Group Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What is the output of this Azure CLI command?
You run the command az group list --query "[].name" -o json. What will this command output?
Azure
az group list --query "[].name" -o json
A["ResourceGroup1": {}, "ResourceGroup2": {}]
B[{"name": "ResourceGroup1"}, {"name": "ResourceGroup2"}]
C["ResourceGroup1", "ResourceGroup2", "ResourceGroup3"]
DSyntaxError: Invalid query syntax
Attempts:
2 left
💡 Hint
The command lists resource groups and extracts only their names as a list.
Configuration
intermediate
2:00remaining
Which Azure CLI command creates a resource group in the East US region?
Select the correct command to create a resource group named MyGroup in the eastus location.
Aaz group create --name MyGroup --location eastus
Baz create group --name MyGroup --location eastus
Caz group create --resource-group MyGroup --location eastus
Daz group new --name MyGroup --location eastus
Attempts:
2 left
💡 Hint
The correct command uses 'az group create' with '--name' and '--location' parameters.
security
advanced
2:00remaining
What happens if you delete a resource group with active resources?
You run az group delete --name MyGroup --yes on a resource group that contains virtual machines and storage accounts. What is the result?
AThe resource group is deleted but resources are moved to a default group.
BThe resource group and all its resources are deleted permanently.
CThe command fails with an error because resources are active.
DOnly the resource group is deleted; resources remain intact.
Attempts:
2 left
💡 Hint
Deleting a resource group deletes everything inside it.
Architecture
advanced
2:00remaining
Which option correctly describes the best practice for organizing resources in Azure?
You want to organize resources by environment (dev, test, prod) and by application. Which approach is best?
ACreate separate resource groups for each environment and application combination.
BPut all resources in a single resource group regardless of environment or application.
CCreate resource groups only by application, ignoring environment.
DCreate one resource group per subscription and put all resources there.
Attempts:
2 left
💡 Hint
Resource groups help manage and isolate resources logically.
🧠 Conceptual
expert
2:00remaining
What is the effect of running az group update --name MyGroup --set tags.env=production?
You run the command to update a resource group. What happens to the tags of the resource group?
Azure
az group update --name MyGroup --set tags.env=production
AThe tag 'env' is added but existing tags with the same key cause an error.
BAll existing tags are removed and replaced with only 'env=production'.
CThe command fails because '--set' cannot update tags.
DThe tag 'env' is added or updated to 'production' without affecting other tags.
Attempts:
2 left
💡 Hint
The '--set' parameter updates or adds properties without removing others.