Search code examples
azure-devopsazure-web-app-serviceazure-pipelinescicdazure-service-principal

What is best practice to create Service connection for multiple microservice deployments?


Background - I'm working on Azure DevOps CICD pipelines for web API microservices project which built in ASP.NET core. There are multiple microservices projects for which I'm implementing the CICD on Azure DevOps. These web APIs are deployed on Azure Web App services in separate resource groups with dependent resources(SQL DB etc).

Issue - While creating CD pipeline, we have to create service connection for web app service. In my case, I have to create separate service connections for each web app service as those are located in different Azure Resource Groups. So what is the best practice to create service connection for multiple web app services? How I can achieve this with single service connection for multiple web app services located under multiple resource groups?


Solution

  • How I can achieve this with single service connection for multiple web app services located under multiple resource groups?

    To achieve this requirement, you can skip specifying the Resource Group name when you create the service connection.

    For example:

    enter image description here

    Then the service connection will have access to all Resource Groups in the Azure Subscription.