Describe the bug
Azure CLI does not allow to disable CMK encryption for Azure MySQL Flexibler Server with Replica role.
Resource Provider API allows such operation and completes it successfully.
According to my knowledge, it is perfectly valid to disable CMK encryption on a server with replica role as encryption mechanism is independent for primary and replica roles.
Related command
az mysql flexible-server update
Errors
Data encryption cannot be modified on a server with replication role. Use the primary server instead.
Issue script & Debug output
Create MySQL Flexible server replica with CMK enryption enabled.
Run az mysql flexible-server update --disable-data-encryption on such replica.
Operation fails on the client side validation performed by Azure CLI.
|
if (instance and instance.replication_role == "Replica") and (disable_data_encryption or byok_key): |
|
raise CLIError("Data encryption cannot be modified on a server with replication role. " |
|
"Use the primary server instead.") |
|
|
Expected behavior
Operation should succeed.
Environment Summary
azure-cli 2.64.0
core 2.64.0
telemetry 1.1.0
Additional context
No response
Describe the bug
Azure CLI does not allow to disable CMK encryption for Azure MySQL Flexibler Server with Replica role.
Resource Provider API allows such operation and completes it successfully.
According to my knowledge, it is perfectly valid to disable CMK encryption on a server with replica role as encryption mechanism is independent for primary and replica roles.
Related command
az mysql flexible-server updateErrors
Data encryption cannot be modified on a server with replication role. Use the primary server instead.
Issue script & Debug output
Create MySQL Flexible server replica with CMK enryption enabled.
Run
az mysql flexible-server update --disable-data-encryptionon such replica.Operation fails on the client side validation performed by Azure CLI.
azure-cli/src/azure-cli/azure/cli/command_modules/mysql/_validators.py
Lines 299 to 302 in 3194af8
Expected behavior
Operation should succeed.
Environment Summary
azure-cli 2.64.0
core 2.64.0
telemetry 1.1.0
Additional context
No response