A development team is deploying a testing environment that consists of an Azure Virtual Machine and an Azure SQL Database. The team needs to manage the lifecycle of these resources together, including deleting them simultaneously at the end of the test. The Virtual Machine must be deployed in the North Europe region to be close to developers, while the SQL Database must be deployed in the West Europe region for compliance.
Which of the following resource group configurations should the team use?
- ACreate a parent resource group in North Europe for the Virtual Machine, and create a nested child resource group for the SQL Database.
- BDeploy the Virtual Machine and the SQL Database to separate resource groups, because resources must reside in a resource group located in the same region as the resource.
- Deploy both resources to a single resource group, regardless of the location of the resource group itself.Answer
- DDeploy both resources to a single resource group, which will automatically force the SQL Database to be deployed in the same region as the Virtual Machine.
Answer
Deploy both resources to a single resource group, regardless of the location of the resource group itself.
Deploying both resources to a single resource group is the correct approach. Azure resource groups are logical containers designed to group resources that share the same lifecycle. Resources within a resource group do not need to be in the same Azure region as each other or the resource group itself. Therefore, a Virtual Machine in North Europe and a SQL Database in West Europe can reside in the same resource group, allowing them to be deleted together when the group is deleted.
Step-by-Step Solution
Key Concept
Azure resource groups serve as logical containers for resources, allowing items in different regions to be grouped together for lifecycle management without nesting.