Skip to content

"az keyvault secret download --file" should allow for overwriting of existing files #30994

@dvasdekis

Description

@dvasdekis

Related command
az keyvault secret download

Is your feature request related to a problem? Please describe.
When running az keyvault secret download --file "this" ... multiple times, there's no option to overwrite the existing file. Instead, the command fails if the file exists.

Describe the solution you'd like
An extra flag (e.g. --overwrite) that allows for the file produced by the command to be overwritten, if it exists.

Describe alternatives you've considered
Adding commands inline to delete the file if it exists breaks the portability of scripts between Windows and Linux, as these commands are different on the two platforms.

Additional context
Example that fails is: az keyvault secret download --file "my.pfx" --name "secretname" --subscription "mysubscription" --vault-name "mykeyvault" which returns:
File or directory named 'my.pfx' already exists.

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamKeyVaultaz keyvaultcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions