Skip to content

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

Description

@kamilzzz

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.

if instance.replication_role == 'Replica':
raise CLIError("Cannot assign identities to a server with replication role. Use the primary server instead.")

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botMySQLService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions