Giter Site home page Giter Site logo

azure-policies's Introduction

azure-policies

This repository contains some Azure policies which I have created and found useful at various client sites.

Notes

Policy Definition Structure

https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure

Get Aliases

Get aliases required for when defining types in a policy. Below is an example for retrieving the aliases for KeyVault using both PowerShell and AzureCLI

Get-AzPolicyAlias -NamespaceMatch 'Microsoft.KeyVault' | Select-Object -ExpandProperty Aliases
az provider show --namespace Microsoft.KeyVault --expand "resourceTypes/aliases" --query "resourceTypes[].aliases[].name"

List Available Resources

Get-AzPolicyAlias | Select-Object Namespace -Unique | Sort-Object Namespace

List of available resources which can be used with Azure Policy.

Namespace
---------
Microsoft.AnalysisServices
Microsoft.ApiManagement
Microsoft.Authorization
Microsoft.Automation
Microsoft.Batch
Microsoft.Blueprint
Microsoft.Cache
Microsoft.Cdn
Microsoft.Compute
Microsoft.ContainerRegistry
Microsoft.ContainerService
Microsoft.Databricks
Microsoft.DataFactory
Microsoft.DataLakeAnalytics
Microsoft.DataLakeStore
Microsoft.DBforMySQL
Microsoft.DBforPostgreSQL
Microsoft.Devices
Microsoft.DevTestLab
Microsoft.DocumentDB
Microsoft.EventGrid
Microsoft.EventHub
Microsoft.GuestConfiguration
Microsoft.HDInsight
microsoft.insights
Microsoft.KeyVault
Microsoft.Logic
Microsoft.MachineLearning
Microsoft.Network
Microsoft.NotificationHubs
Microsoft.OperationalInsights
Microsoft.RecoveryServices
Microsoft.Resources
Microsoft.Scheduler
Microsoft.Search
Microsoft.Security
Microsoft.ServiceFabric
Microsoft.Solutions
Microsoft.Sql
Microsoft.Storage
Microsoft.Web

Create New Policy

New-AzPolicyDefinition -Name 'auditKeyVaultSoftDelete' -Description 'Audit for Soft Delete Status on KeyVault' -Policy '.\softDelete-audit.json'

Azure Policies Index

https://docs.microsoft.com/en-us/azure/governance/policy/samples/index

Azure Policy Samples GitHub

https://github.com/Azure/azure-policy

azure-policies's People

Contributors

harmrai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.