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
* Reducing cloud costs and decommissioning unused resources are essential practices for efficient cloud management.
9
+
10
+
#### Cost Savings
11
+
* Pay-as-you-go model: Cloud services charge based on resource usage, so any unused or idle resources still incur costs. Decommissioning these saves money that can be allocated elsewhere.
12
+
* Hidden costs: Over-provisioned or forgotten services like unused VMs, storage, or databases can rack up unexpected costs over time.
13
+
#### Resource Optimization
14
+
* Avoid over-provisioning: Scaling down unused or underutilized resources ensures you're only paying for what you need, preventing waste.
15
+
* Better performance: By right-sizing resources, you allocate appropriate computing power to services, improving overall performance.
16
+
#### Improved Security
17
+
* Minimize attack surface: Decommissioning unused resources reduces potential vulnerabilities that could be exploited by attackers.
18
+
* Avoid data leakage: Retiring unnecessary storage or services prevents accidental exposure of sensitive data.
19
+
#### Operational Efficiency
20
+
* Simplified management: Fewer resources mean less administrative overhead in terms of monitoring, patching, and maintenance.
21
+
* Compliance and governance: Removing outdated or unnecessary assets helps maintain compliance with regulatory standards, as only necessary resources are active
22
+
23
+
24
+
### This is defined in a way that it decommisions a resource group based on a specific tag in azure. When the autmation finds `Temporary` tag wth Value as `TRUE` it decommisions.
25
+
26
+
27
+
#### For the automation to work we needd a service principal which has access to the subscription level atleast with contributor permission as deletion of resources are involved.
28
+
29
+
#### Configure the below environment variables as GitHub secrets
30
+
31
+
```markdown
32
+
AZURE_CLIENT_ID = "value"
33
+
AZURE_CLIENT_SECRET = "value"
34
+
AZURE_TENANT_ID = "value"
35
+
```
36
+
37
+
* The code is using python with poetry as package management tool
38
+
39
+
* This job is set to run as a cron every day and as a manual trigger as well if necessary
40
+
41
+
```markdown
42
+
43
+
This is a sample of output showing what are the resources deleted
44
+
45
+
The below resources are decommisioned on <Date : yyyy-mm-dd>
0 commit comments