Related command
az redis import
Is your feature request related to a problem? Please describe.
az redis import is a destructive operation: per the Azure Cache for Redis documentation, "Importing data deletes preexisting cache data, and the cache isn't accessible by cache clients during the import process" (https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-import-export-data). Functionally it is flush-plus-load.
The CLI does not signal this anywhere:
- No confirmation prompt and no
--yes flag. The command executes immediately.
- The help text reads only "Import data into a Redis cache", with no mention that existing data is deleted or that the cache is unavailable to clients during the import.
This is inconsistent with the sibling commands in the same group, which are equally or less destructive and both prompt:
$ az redis delete --help | grep -A1 -- --yes
--yes -y : Do not prompt for confirmation.
$ az redis flush --help | grep -A1 -- --yes
--yes -y : Do not prompt for confirmation.
$ az redis import --help | grep -c -- --yes
0
Observed on azure-cli 2.88.0.
The practical consequence: an operator who knows flush and delete are guarded reasonably assumes import is not in the same destructive class, because the CLI itself communicates that classification through prompts. We investigated a production data-loss incident in which az redis import was run against a production cache as a diagnostic step and the cache's contents were lost. A confirmation prompt stating "this deletes all existing data in the cache" would very likely have stopped the command from being run.
Describe the solution you'd like
- Add a confirmation prompt to
az redis import (the standard prompt_y_n pattern), suppressible with --yes/-y, with wording that states existing cache data will be deleted and the cache will be inaccessible to clients during the import.
- Update the command's help/short summary to carry the same warning, so it also surfaces in
az redis import --help and the reference docs.
If adding a prompt to an existing command is considered a breaking change, a reasonable path is to emit a prominent warning immediately and introduce the prompt at the next breaking-change window, as has been done for other commands.
Describe alternatives you've considered
- Documentation-only fix (help-text change without a prompt): better than nothing, but it does not protect scripted or hurried invocations the way the existing
flush/delete prompts do.
- Client-side wrappers/policy in our own tooling: we have done this, but it fixes only our estate; the inconsistency remains a trap for every other azure-cli user.
Additional context
az redis import-method (if still present) and az redisenterprise database import may deserve the same review, since the underlying service behavior (import replaces existing data) is the same.
Related command
az redis importIs your feature request related to a problem? Please describe.
az redis importis a destructive operation: per the Azure Cache for Redis documentation, "Importing data deletes preexisting cache data, and the cache isn't accessible by cache clients during the import process" (https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-import-export-data). Functionally it is flush-plus-load.The CLI does not signal this anywhere:
--yesflag. The command executes immediately.This is inconsistent with the sibling commands in the same group, which are equally or less destructive and both prompt:
Observed on azure-cli 2.88.0.
The practical consequence: an operator who knows
flushanddeleteare guarded reasonably assumesimportis not in the same destructive class, because the CLI itself communicates that classification through prompts. We investigated a production data-loss incident in whichaz redis importwas run against a production cache as a diagnostic step and the cache's contents were lost. A confirmation prompt stating "this deletes all existing data in the cache" would very likely have stopped the command from being run.Describe the solution you'd like
az redis import(the standardprompt_y_npattern), suppressible with--yes/-y, with wording that states existing cache data will be deleted and the cache will be inaccessible to clients during the import.az redis import --helpand the reference docs.If adding a prompt to an existing command is considered a breaking change, a reasonable path is to emit a prominent warning immediately and introduce the prompt at the next breaking-change window, as has been done for other commands.
Describe alternatives you've considered
flush/deleteprompts do.Additional context
az redis import-method(if still present) andaz redisenterprise database importmay deserve the same review, since the underlying service behavior (import replaces existing data) is the same.