lambodar
lambodar

Reputation: 3763

Secret name is not supporting special character

I have a requirement where I need to store my secret name as fname_lname. But when I tried with underscore I got following error. For time being to bypass the error I wrote a utility to convert from underscore to hyphen and vice versa.

Is there any reason why there is no support for basic special character like underscore?

az keyvault secret set --vault-name 'my-kv' -n 'fname_lname' -v 'myvalue' parameter 'secret_name' must conform to the following pattern: '^[0-9a-zA-Z-]+$'.

Upvotes: 4

Views: 8202

Answers (1)

Joy Wang
Joy Wang

Reputation: 42053

It seems that we could not find any technical reason as to why the basic special characters are not supported. Also in the REST API Set Secret, it just mentioned the name should be like Regex pattern: ^[0-9a-zA-Z-]+$ without the reason, it should by designed.

There are also some user voices in the azure feedback: Secret Names do not support special characters, if you want to improve azure keyvault, you could vote it.

Upvotes: 7

Related Questions