Azure / Azure/azure-cli

`az mysql flexible-server identity` doesn't allow to remove identity from replica server

Open
#30,004 4 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Auto-Assign bug customer-reported MySQL Service Attention
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

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.