https://github.com/expecho/policy-initiative-bicep-builder
Blazor app to aid in building a bicep template for azure policy initiatives
https://github.com/expecho/policy-initiative-bicep-builder
azure azure-governance azure-policies azure-policy blazor blazor-client blazor-webassembly
Last synced: about 2 months ago
JSON representation
Blazor app to aid in building a bicep template for azure policy initiatives
- Host: GitHub
- URL: https://github.com/expecho/policy-initiative-bicep-builder
- Owner: Expecho
- License: mit
- Created: 2023-08-16T12:09:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-25T11:16:03.000Z (4 months ago)
- Last Synced: 2025-01-17T04:21:12.220Z (3 months ago)
- Topics: azure, azure-governance, azure-policies, azure-policy, blazor, blazor-client, blazor-webassembly
- Language: C#
- Homepage:
- Size: 951 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Policy Initiative Bicep Builder
This app allows you to visually select one or more policies and generates or updates a bicep file to deploy a policy initiative.
Accessible at https://policyinitiativebuilder.yellowbay-9c92f1d3.westeurope.azurecontainerapps.io/


## Tools & Resources
- [Radzen Blazor Components](https://blazor.radzen.com/docs/index.html)
- [Azure Policy Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=AzurePolicy.azurepolicyextension)## Resource Graph Explorer Queries
### Get a list of all exemptions
```sql
policyresources
| where type == "microsoft.authorization/policyexemptions"
| project
id,
name,
tenantId,
resourceGroup,
subscriptionId,
policyAssignmentId = properties.policyAssignmentId,
displayName = properties.displayName,
description = properties.description,
category = properties.exemptionCategory,
properties
```### Get a list of all policies
```sql
PolicyResources
| extend subscriptionId = tostring(properties.subscriptionId)
| join kind=leftouter (
ResourceContainers
| where type=='microsoft.resources/subscriptions'
| project subscriptionName=name, subscriptionId) on subscriptionId
| where type =~ 'Microsoft.PolicyInsights/PolicyStates'
| project
policyAssignmentName = properties.policyAssignmentName,
policy = properties.policyDefinitionReferenceId,
state = properties.complianceState,
effect = properties.policyDefinitionAction,
subscriptionId,
subscriptionName,
resourceGroup = properties.resourceGroup,
resourceType = properties.resourceType,
resourceId = properties.resourceId,
properties
| order by tostring(policyAssignmentName) desc, tostring(['state']) asc
```