microsoft / azurechat

🤖 💼 Azure Chat Solution Accelerator powered by Azure Open AI Service
MIT License
1.2k stars 1.12k forks source link

Template deployment fails on KeyVault naming #172

Open leongj opened 1 year ago

leongj commented 1 year ago

Under certain scenarios, the template deployment fails because the KeyVault cannot have a double-hyphen ("--") in its name. This appears to be due to truncation of the "name" parameter entered by the user and combined on line 273 of infra/main.json:

273: "keyVaultName": "[toLower(format('{0}-kv-{1}', variables('kv_prefix'), parameters('resourceToken')))]",

removing the hyphens on either side of kv fixes the issue.

dareima commented 1 year ago

@leongj ran into the exact same issue. Not very forward-looking to add static hyphens when there can be so many variations the admin can enter for the environment name.

Thanks so much for directly pointing out the solution!