You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure Policy helps to enforce organizational standards and to assess compliance at-scale.
14
+
Through its compliance dashboard, it provides an aggregated view to evaluate the overall state of the environment,
15
+
with the ability to drill down to the per-resource, per-policy granularity. It also helps to bring your resources to compliance through bulk remediation for existing resources and automatic remediation for new resources.
16
+
```
17
+
Read more here: [Azure Governance - Policy](https://learn.microsoft.com/en-us/azure/governance/policy/overview)
18
+
19
+
# What the code does
20
+
21
+
```
22
+
As the name suggests, this is an automation to remove policy from a subscription by name especially tagging policies with subscription name and policy name as input
23
+
```
24
+
25
+
# Athentication
26
+
27
+
```markdown
28
+
AZURE_CLIENT_ID= "xxxxxxxxxxx"
29
+
AZURE_CLIENT_SECRET = "xxxxxxxxxxx"
30
+
AZURE_SUBSCRIPTION_ID = "xxxxxxxxxxx"
31
+
AZURE_TENANT_ID = "xxxxxxxxxxx"
32
+
```
33
+
* Replace ` "xxxxxxxxxxx" ` with proper values
34
+
35
+
**Rest is taken care by `DefaultAzureCredential` from `azure-identity` module**
36
+
37
+
# How code works
38
+
39
+
| file name | funtions |
40
+
|-----------|----------|
41
+
| azure_resource_graph_query.py | this file takes an argument, your subscription name and returns subscription id |
42
+
| remove_azure_policy.py | this is the main py file. takes subscription id and policy name as inputs and removes policy if present |
0 commit comments