Azure / Azure/terraform-provider-azapi
bug: ignore diagnostics settings categories that are not enabled
- Dominant language
- Go
- Stars
- 244
- Forks
- 97
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
When setting diagnostic settings, any that are not enabled should be removed from the items returned.
e.g. for a storage account, if you set "StorageDelete" and "StorageWrite", on subsequent plans you will see this:
```
~ resource "azapi_resource" "diagnostic_settings" {
~ body = {
~ properties = {
~ logs = [
{
category = "StorageDelete"
categoryGroup = null
enabled = true
},
- {
- category = "StorageRead"
- categoryGroup = null
- enabled = false
},
{
category = "StorageWrite"
categoryGroup = null
enabled = true
},
]
# (7 unchanged attributes hidden)
```
Contributor guide
Research direction
No file or test is named. Reproduce the storage-account diagnostic-settings plan described in the issue, then trace how diagnostic settings are returned and compare the resulting logs with the enabled categories; done means disabled categories are omitted and subsequent plans show no spurious diff.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go, terraform
- Domain
- cloud, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100