Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Manage resource groups

A worked example

Single answer

A team runs a test web application made up of an App Service plan, a web app and a virtual network. The team tears down and recreates these resources every two weeks. The application uses an Azure SQL database that must persist across every teardown. The database team must be able to manage the database, but must not have access to the web application resources. You need a resource group design that meets these requirements with the least ongoing administrative effort.

Which design should you use?

Choose one answer
Why

Resources in a resource group should share a lifecycle, because deleting the group deletes everything in it. A resource that must outlive the others belongs in its own group. Access granted at a resource group scope applies to all resources in that group. Separate groups therefore let you scope the database team's permissions to the database resource group, and the application resource group can be deleted and recreated without deleting the database.

  • Not correct: Place all the resources in one resource group, and grant the database team access at that resource group scope. Access granted on a resource group applies to every resource in it, so the database team would reach the web application. Deleting the group would also delete the database.
  • Not correct: Place all the resources in one resource group, and move the database to another resource group before each teardown, then move it back. This design relies on recurring database moves instead of separating resources by lifecycle. It therefore does not provide the least ongoing administrative effort.
  • Not correct: Create a resource group for the database inside the web application resource group, and grant the database team access to the inner group. Resource groups cannot be nested, so this structure is not possible.
  • Correct: Put the web application in one resource group and the database in another, and grant the database team access at the database group scope. The two sets of resources have different lifecycles, so they belong in different groups. Deleting the application group leaves the database untouched, and access granted at the database group's scope applies to the resources in that group.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free