AZ-900 Create an Azure Policy

 AZ-900 Azure Policy


Azure Policy helps enforce rules for configuring and deploying resources. This keeps your Azure environment compliant with your organization's or regulatory standards.

Step 1 : go to the Azure Portal. And sign in using your credentials.

Step 2 : From Azure Sidebar select all services.





Step 3 :  Go to the Policy Page from Management and governance section.




Step 4 : From the Policy sidebar under the Authoring section, click on Assignments. An Assignment is a policy that has been assigned to take place within a specific scope. For example, a definition could be assigned to the subscription scope.


Step 5 : Click on assign policy.



Step 6 : Select the details as shown in below image. And Click Review + create. And click Create.

Note: A scope determines what resources or grouping of resources the policy assignment applies to. In our case we could assign this policy to a specific resource group, however we chose to assign the policy at subscription level. Be aware that resources can be excluded based on the scope configuration. Exclusions are optional.

Note: This Allowed Locations policy definition will specify a location into which all resources must be deployed. If a different location is chosen, deployment will not be allowed.





Note : If you see error like shown in above image from overview page change scope from subscription to resource group. Like shown in below image.












Step 7 : Test the Policy Assignment.
Go to the all services and search for storage account and then click create.




Step 8: If you try to add details and in location field if you select any other location then Japan west it will show you a policy error.


If you change the location to Japan west it will remove that policy error.






























Comments

Popular posts from this blog

AI-900-3,4

AI-900 12,13

AI-900 10,11