azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

ResourceGroup should be at the service level and root of azure.yaml

Open KSchlobohm opened this issue 3 years ago • 2 comments

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.

  1. 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'.
  2. 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

KSchlobohm avatar Sep 16 '22 15:09 KSchlobohm

@ellismg please take a look at it. Could be some additional requirements to your new environment proposal in Azd.

rajeshkamal5050 avatar Sep 19 '22 15:09 rajeshkamal5050

I would like to see resourceGroup at the root level and add it at the service level.

  1. If at root, then all services should be deployed to that resource group
  2. If at service, then that service is in that resource group
  3. Otherwise, use our current defaulting logic.

This allows flexibility so a user can have services in any resource group.

jongio avatar Oct 03 '22 17:10 jongio

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?

jongio avatar Jan 06 '23 18:01 jongio

@ellismg to be discussed with Matt on the scope of change.

rajeshkamal5050 avatar Jan 23 '23 22:01 rajeshkamal5050

@savannahostrowski @ellismg Not in scope for GA. Moving this to Gallium.

rajeshkamal5050 avatar Mar 22 '23 16:03 rajeshkamal5050

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:

  1. Deploy global/root level infra defined within the root infra folder
  2. Deploy service level infra defined for each service that defined an infra folder

Other related items to consider

  1. Multi-region infra deployments a. Deploy service X to eastus & westus

wbreza avatar Apr 25 '23 17:04 wbreza