Azure Policy Compliance Check With Azure DevOps

Azure Policy
Azure Cloud

Share Post Now :

HOW TO GET HIGH PAYING JOBS IN AWS CLOUD

Even as a beginner with NO Experience Coding Language

Explore Free course Now

Table of Contents

Loading

This blog talks about Azure DevOps release gates and how you can use them to check Azure policy compliance.

The technologies that are covered in this blog are a part of the Azure DevOps environment. If it’s something in which you have an interest or you want to learn, then you can visit our previous blog to know more about the [AZ-400] Microsoft Azure DevOps certification.

Azure Policy and DevOps

Note: You Can Check Our Blog on Azure Pipelines.

Azure Policy helps you manage and prevent IT issues by using policy definitions that enforce rules and effects for your resources.

When you use Azure Policy, resources stay compliant with your corporate standards and service level agreements. Policies can be applied to an entire subscription, a management group, or a resource group.

Note: Check Our Blog on DevSecOps Git Scanning

Step 1: Create an Azure Policy in the Azure portal. There are several pre-defined sample policies that can be applied to a management group, subscription, and resource group.

Step 2: In Azure DevOps create a release pipeline that contains at least one stage, or open an existing release pipeline.

Step 3: Add a pre-or post-deployment condition that includes the Security and compliance assessment task as a gate.

Post Deployment Condition

Step 4: Navigate to your team project in Azure DevOps.

Step 5: In the Pipelines section, open the Releases page and create a new release.

Step 6: Choose the In progress link in the release view to open the live logs page.

Check Out: Azure DevOps Engineer Roles and Responsibilities. Click here

Step 7: When the release is in progress and attempts to perform an action disallowed by the defined policy, the deployment is marked as Failed. The error message contains a link to view the policy violations.

deployment Failed demo

Step 8: An error message is written to the logs and displayed in the stage status panel on the releases page of Azure Pipelines.

Error Log

Check out: Azure Support Plans to know all the options available

Step 9: When the policy compliance gate passes the release, a Succeeded status is displayed.

Compliance Success gate demo

Step 10: Choose the successful deployment to view the detailed logs.

Successful deployment log

Also read: A basic overview of how Git Branching Strategy DevOps can be used to implement a Branching Strategy in an Azure Environment.

Related/References

Next Task For You

Begin your journey toward Mastering Azure Cloud and landing high-paying jobs. Just click on the register now button on the below image to register for a Free Class on Mastering Azure Cloud: How to Build In-Demand Skills and Land High-Paying Jobs. This class will help you understand better, so you can choose the right career path and get a higher paying job.

azure cloud job free class

Picture of mike

mike

I started my IT career in 2000 as an Oracle DBA/Apps DBA. The first few years were tough (<$100/month), with very little growth. In 2004, I moved to the UK. After working really hard, I landed a job that paid me £2700 per month. In February 2005, I saw a job that was £450 per day, which was nearly 4 times of my then salary.