-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Describe the bug
We successfully create an eventhub with cleanup policy set as Compact and then we try to create an authorization rule for that eventhub, but the creation of the rule fails.
Related command
First we run:
az eventhubs eventhub create --subscription <subscription-value> --resource-group <resource-group-value> --namespace-name <namespace-value> --name <eventhub-name-value> --partition-count <partition-count-value> --cleanup-policy Compact
The response of the above command is successful and it includes this:
"retentionDescription": {
"cleanupPolicy": "Compact"
}
Then we run:
az eventhubs eventhub authorization-rule create --subscription <subscription-value> --resource-group <resource-group-value> --namespace-name <namespace-value> --eventhub-name <eventhub-name-value> --name <authorization-rule-name> --rights Send
And it fails with the error below.
Errors
(MessagingGatewayBadRequest) SubCode=40000. CleanupPolicy changes are not allowed in update.
Issue script & Debug output
cli.azure.cli.core.azclierror: (MessagingGatewayBadRequest) SubCode=40000. CleanupPolicy changes are not allowed in update. TrackingId:a4e9bb9e-9d67-4d70-8ffe-efb3a970db6c_G52, SystemTracker:...development.servicebus.windows.net:eventhub-name, Timestamp:2023-07-11T14:45:19
Code: MessagingGatewayBadRequest
Message: SubCode=40000. CleanupPolicy changes are not allowed in update. TrackingId:a4e9bb9e-9d67-4d70-8ffe-efb3a970db6c_G52, SystemTracker:....servicebus.windows.net:eventhub-name, Timestamp:2023-07-11T14:45:19
Expected behavior
The authorization rule should be created without any failure.
Environment Summary
azure-cli 2.50.0
Additional context
No response