WebTemplateStudio icon indicating copy to clipboard operation
WebTemplateStudio copied to clipboard

Change the cosmos db secret name from COSMOSDB_PRIMARY_KEY to a secret name supported by AKV

Open fvarga01 opened this issue 4 years ago • 0 comments

AKV requires alphanumeric characters. If a user adds AKV functionality to the existing app, they will see an error if they try to use the existing names:

c:>az keyvault secret set --vault-name "mykeyvault" --name "COSMOSDB_PRIMARY_KEY" --value "..."

Error observed: Parameter 'secret_name' must conform to the following pattern: '^[0-9a-zA-Z-]+$'.

Describe the solution you'd like Change the setting name from COSMOSDB_PRIMARY_KEY to something without underscores, such as COSMOSDBPRIMARYKEY

more info: https://docs.microsoft.com/en-us/aspnet/core/security/key-vault-configuration?view=aspnetcore-5.0#secret-storage-in-the-production-environment-with-azure-key-vault "Azure Key Vault secret names are limited to alphanumeric characters and dashes."

fvarga01 avatar Oct 14 '21 20:10 fvarga01