Azure / Azure/azure-cli

Put Diagnostics Setting as a Separate Resource under a Resource Group

Open
#22,615 4 comments 0 reactions 0 assignees View on GitHub
act-observability-squad customer-reported Monitor Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Description**
This is not a direct part of Azure CLI but since I cannot find the repository for Azure Portal or Azure Platform itself, I will post the feature request here to get redirected to the right team.

**Motivation**
I am deploying Azure infrastructure using Terraform. Currently, diagnostics settings are managed outside of resource groups. It is hard to find and go to the correct diagnostics setting since you have to click through lots of blades. When I manually delete everything in my subscription, all the resource groups that is, the diagnostics settings are still there. But I cannot see them directly. I have to go to the Diagnostics Settings page and set the correct filters to see the remaining but undesired diagnostics settings. When I do another Terraform apply, it errors out and tells me that there is already a diagnostics setting that exists with the same name.

**Possible Solutions**
1. Whenever you delete a resource, all and any of the associated diagnostics settings of that particular resource will be force deleted.
2. Put diagnostics settings as a separate resource that has to be put under a resource group. That way, whenever I delete the resource group, it also deletes the unneeded diagnostics settings.

References:

https://github.com/hashicorp/terraform-provider-azurerm/issues/6389
https://github.com/hashicorp/terraform-provider-azurerm/issues/15734
https://github.com/hashicorp/terraform-provider-azurerm/issues/8930
https://github.com/hashicorp/terraform-provider-azurerm/issues/7114

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.