`az mysql flexible-server identity` doesn't allow to remove identity from replica server
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
Azure CLI does not allow to to remove identity from replica server.
Resource Provider API allows such operation and completes it successfully.
### Related command
`az mysql flexible-server identity remove`
### Errors
Cannot remove identities from a server with replication role. Use the primary server instead.
### Issue script & Debug output
Create MySQL Flexible server replica with user assigned managed identity.
Try to remove identity using `az mysql flexible-server identity remove`.
Operation fails on the client side validation performed by Azure CLI.
https://github.com/Azure/azure-cli/blob/d1369fdd681eb1075401f133b04d5fdd73d416ef/src/azure-cli/azure/cli/command_modules/mysql/custom.py#L1625-L1626
### Expected behavior
Identity to be removed successfully.
### Environment Summary
azure-cli 2.64.0
core 2.64.0
telemetry 1.1.0
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.