Azure / Azure/azure-cli

Tag update command not escaping resource id when it contains parentheses

Open
#18,078 4 comments 1 reaction 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

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

## Describe the bug

**Command Name**

```
az tag update --resource-id "/subscriptions/redacted/resourceGroups/redacted/providers/Microsoft.OperationsManagement/solutions/WireData2(CORE-CACN-LAW)" --operation "delete" --tags "Cost-center=0"
```

**Errors:**
```
--operation was unexpected at this time.
C:\Users\User\Downloads\Azure%20Cloud%20Operations\Operations Scripts\TagManagement-v2> "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\\..\python.exe" -IBm azure.cli tag update --resource-id /subscriptions/redacted/resourceGroups/redacted/providers/Microsoft.OperationsManagement/solutions/WireData2(CORE-CACN-LAW) --operation delete --tags Cost-center=0
```

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

- Find a resource with a paren in the resourceId
- Try and use the `az tag update` command on the resource

## Expected Behavior
Tags should be updated successfully.
Presumably, the internal invocation of python should be quoting the resource id parameter?

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

azure-cli 2.23.0

```
## Additional Context

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.