ResourceGroup should be at the service level and root of azure.yaml
Opening this issue as part of a feature request. My goal is to develop an azd template that is capable of deploying a multiregional web app. The tricky part of this goal seems to be adding support for multiple environments (e.g. dev, qa, prod) and asking for different behaviors per environment.
- For non-prod environments my goal is to choose cheaper SKU like 'B1' for Azure App Service Plan. For a prod environment my goal is to choose a more powerful sku like 'P2V1'.
- For non-prod environments my goal is to deploy to a single region. For a prod environment my goal is to deploy to multiple regions.
Having the ability to associate a service with a resource group would help me be more descriptive about the behavior I want to describe in the azure.yaml
@ellismg please take a look at it. Could be some additional requirements to your new environment proposal in Azd.
I would like to see resourceGroup at the root level and add it at the service level.
- If at root, then all services should be deployed to that resource group
- If at service, then that service is in that resource group
- Otherwise, use our current defaulting logic.
This allows flexibility so a user can have services in any resource group.
I ran into this today where I have two services that need to be deployed to two different resource groups.
Can we add "resourceGroup" to services?
@ellismg to be discussed with Matt on the scope of change.
@savannahostrowski @ellismg Not in scope for GA. Moving this to Gallium.
This aligns with the concept of service level infra that I have envisioned where each service would have the ability to define its own infra folder. At that point if needed additional resource groups could be created as part of that infra.
This would update azd provision to perform the following:
- Deploy
global/rootlevel infra defined within the rootinfrafolder - Deploy
servicelevel infra defined for each service that defined aninfrafolder
Other related items to consider
- Multi-region infra deployments a. Deploy service X to eastus & westus