简体   繁体   中英

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. And deployed these ARM templates in to azure using Azure DevOps process CI and CD.

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. But I don't know how to integrate policies with 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:

在此处输入图片说明

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 . Also, you can now evaluate Azure Policies via an Release Gate. See: 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.

You can find details here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM