简体   繁体   English

如何将 Azure Policy 与 Azure DevOps 集成?

[英]How to integrate Azure Policy with Azure DevOps?

I created the ARM templates for Azure Web App, Azure SQL Database, Key vault and Azure Storage.我为 Azure Web App、Azure SQL 数据库、Key Vault 和 Azure 存储创建了 ARM 模板。 And deployed these ARM templates in to azure using Azure DevOps process CI and CD.并使用 Azure DevOps 流程 CI 和 CD 将这些 ARM 模板部署到 azure 中。

But I want to enforce policies as part of the development process.但我想将政策作为开发过程的一部分。 I know Microsoft released the feature of Azure Policy integration with Azure DevOps is now available.我知道 Microsoft 发布了 Azure Policy 与 Azure DevOps 集成的功能现已可用。 But I don't know how to integrate policies with Azure DevOps.但我不知道如何将策略与 Azure DevOps 集成。

Can anyone suggest me or provide any useful documentation?任何人都可以建议我或提供任何有用的文档吗?

After creating and assigning policies, they are automatically evaluated on every template deployment.创建和分配策略后,它们会在每个模板部署上自动进行评估。 If there is an attempt to deploy a template that violates a policy with a deny effect, you can see this in Azure DevOps:如果尝试部署违反具有拒绝效果的策略的模板,您可以在 Azure DevOps 中看到这一点:

在此处输入图片说明

Edit: How to use steps for creating and assigning policies and finding the output can be found on the docs: https://docs.microsoft.com/en-us/azure/devops/pipelines/release/azure-policy?view=azure-devops .编辑:如何使用创建和分配策略以及查找输出的步骤可以在文档中找到: https : //docs.microsoft.com/en-us/azure/devops/pipelines/release/azure-policy? view = azure-devops Also, you can now evaluate Azure Policies via an Release Gate.此外,您现在可以通过 Release Gate 评估 Azure 策略。 See: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-policy-check-gate?view=azure-devops请参阅: https : //docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-policy-check-gate?view=azure-devops

Azure Pipelines has Policy gates that can also be used to check if the underlying resources/resource group/subscription is compliant before proceeding. Azure Pipelines 具有策略门,还可用于在继续之前检查基础资源/资源组/订阅是否合规。

You can find details here .您可以在此处找到详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 Azure DevOps 服务器存储库与 Azure DevOps 服务管道集成 - How to integrate Azure DevOps Servers repositories with Azure DevOps Services Pipelines 将 CodeceptJS 与 Azure DevOps 集成 - Integrate CodeceptJS with Azure DevOps 将Azure DevOps集成到Jenkins - Integrate Azure DevOps to Jenkins 如何将内部系统与 azure devops 集成? - How to integrate in house system with azure devops? Azure DevOps:分支创建策略 - Azure DevOps: policy for branch creation 有没有办法将 Azure Arc for Kubernetes 与 Azure DevOps 集成? - Is there a way to integrate Azure Arc for Kubernetes with Azure DevOps? azure - how to integrate azure advanced App Service Authentication / Authorization to access azure devops API (tasks, pipelines) - azure - how to integrate azure advanced App Service Authentication / Authorization to access azure devops API (tasks, pipelines) 将 CI 和 CD 集成在一起 Azure Devops - Integrate CI and CD together Azure Devops 使用 Azure Devops 部署 Azure 策略 ARM 模板失败 - Deploying Azure policy ARM template using Azure Devops fails Azure redis 缓存的策略别名 - terraform ZCF04A02E37B774FC311A48F09 - Azure Policy alias for redis cache not found - terraform azure devops
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM