Azure / Azure/azure-cli

`az monitor diagnostic-settings list` (and `show`) not working for ACS resource

Open
#20,772 2 comments 0 reactions 1 assignee Claimed by @kairu-ms View on GitHub
act-observability-squad customer-reported feature-request Monitor - Diagnostic Settings
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

Diagnostic settings for Azure Communication Service (ACS) resources do not appear to be supported by the Azure CLI.

**Command Name**
`az monitor diagnostic-settings list`

**Errors:**
Diagnostic settings that are defined in the Azure Portal are not returned. Instead, the following is returned:
```
{
"value": []
}
```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- _Put any pre-requisite steps here..._
- `az monitor diagnostic-settings list --resource {}`

## Expected Behavior

The diagnostic settings that were defined in the Azure Portal are returned.

## Environment Summary
```
Windows-10-10.0.18362-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.31.0

```
## Additional Context

My intention here is to automate the creation of the ACS resource's diagnostics settings as part of a CI/CD pipeline that includes all provisioning of Azure resources and maintaining desired state. Unfortunately, it appears that ARM template support for diagnostic settings are also not supported (!!!!!!!!GRRR!!!!!!!) Or at least I couldn't get it to work due to validation errors that weren't ever explained. Using an Azure CLI task in the pipeline was my fallback but I can't even get it to see the existing diagnostic setting that is there.

I am quite certain that the resource ID is accurate. I also tried using the resource name, resource group named, and resource type arguments instead of the resource ID in case I somehow did get it wrong.

`az monitor diagnostic-settings show` also did not work when I included the exact name of the diagnostic settings extension resource. In that case, I got the following error:
```
(ResourceNotFound) The diagnostic setting 'XXXX' doesn't exist.
Code: ResourceNotFound
Message: The diagnostic setting 'XXXX' doesn't exist.
```

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.