How to replace dash to underscore in key name on External Secrets for azure key vaults

315 Views Asked by At

When fetching keys from azure key vault to kubernetes with External secrets, it saved with the same name that was provided in AKV, but AKV doesn't support underscores in key names. Is there an option to fetch all keys and replace dash with an underscore (from - to _)

A solution that I saw is the manual mapping of keys:

- secretKey: DB_NAME
remoteRef:
  key: DB-NAME
1

There are 1 best solutions below

0
On

As far as I know there is no built-in option in External Secrets to replace dash with underscore (from - to _) in Azure.
enter image description here
You can continue with dash as below

enter image description here
enter image description here