I am trying to add a secret to my key vault using AZ-CLI:
az keyvault secret set --name my-secret --value "-secret.my" --vault-name "foo"
As you can see my secret starts with a hyphen '-'. This produces the following error:
ArgumentParseError: argument --value: expected one argument
Try this: 'az keyvault secret set --name MySecret --value {value} --vault-name MyKeyVault'
Any ideas on how to circumvent this without changing the value of the secret?
Updating the answer :
Can you try with a "=" in front of the original value
This
az keyvault secret set --name my-secret --value="-secret.my" --vault-name "foo"
instead of this
az keyvault secret set --name my-secret --value "-secret.my" --vault-name "foo"
Here is the github reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With