Azure / Azure/azure-cli

Resources created using an ARM template are not visible in the az CLI

Open
#18,211 7 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug

**Command Name**
`az resource list`

I've create resources via an ARM template using Azure Devops.
After the deployment has completed, I (locally) run `az resource list` (with the correct login and account).
I then notice that in the results a lot of resources are missing that are visible in the resource group in the portal.

Note: `az cosmosdb list` or `az storage account list` are not listing these resources either.

## To Reproduce:
- Create a Cosmos DB resource via an ARM template via Azure Devops.
- After the deployment, locally run `az resource list` or `az cosmosdb list`
- Notice: the cosmos db resource is missing.

## Expected Behavior
Since the resource has been created (and is visible in the portal), I expected it to be visible to the CLI.

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

azure-cli 2.23.0

Extensions:
application-insights 0.1.13

```
## Additional Context

In the portal when I navigate to the resource group click "delete resource group", then the list of resources in the deletion-drawer is smaller than the resources listed in the overview of the resource group.

If I create an extra cosmosdb account using the CLI (`az cosmosdb create ...`), then suddenly the Cosmos resource created via the ARM template becomes visible too. However, the storage account remains invisible at this point.

The above leads me to believe that the portal and CLI are reading from a projection in Azure and this projection isn't being updated at the right time.

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.