为多个微服务部署创建服务连接的最佳实践是什么?
背景 - 我正在为Web API微服务项目的Azure DevOps CICD管道工作,该项目内置于ASP.NET Core。我正在为Azure DevOps实施多个微服务项目。这些Web API在具有因资源(SQL DB等)的单独资源组中部署在Azure Web App服务上。
问题 - 在创建CD管道时,我们必须为Web App Service创建服务连接。就我而言,我必须为每个Web应用程序服务创建单独的服务连接,因为这些服务位于不同的Azure资源组中。那么,为多个Web App服务创建服务连接的最佳实践是什么?如何通过位于多个资源组下的多个Web应用程序服务的单个服务连接来实现这一目标?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了实现此要求,您可以在创建服务连接时跳过指定资源组名称。
例如:
然后,服务连接将可以访问Azure订阅中的所有资源组。
To achieve this requirement, you can skip specifying the Resource Group name when you create the service connection.
For example:
Then the service connection will have access to all Resource Groups in the Azure Subscription.
在Azure AD中,您可以授予您创建订阅级别权限的服务原理,然后由该订阅中的每个资源组继承。
In azure AD, you can grant one the service principals you create subscription level permissions and those are then inherited by every resource group in that subscription.