-
-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Currently, if deployment name changes, so does the resource names.
keyvault-acmebot/azuredeploy.bicep
Lines 42 to 47 in a24516b
| var functionAppName = 'func-${appNamePrefix}-${substring(uniqueString(resourceGroup().id, deployment().name), 0, 4)}' | |
| var appServicePlanName = 'plan-${appNamePrefix}-${substring(uniqueString(resourceGroup().id, deployment().name), 0, 4)}' | |
| var appInsightsName = 'appi-${appNamePrefix}-${substring(uniqueString(resourceGroup().id, deployment().name), 0, 4)}' | |
| var workspaceName = 'log-${appNamePrefix}-${substring(uniqueString(resourceGroup().id, deployment().name), 0, 4)}' | |
| var storageAccountName = 'st${uniqueString(resourceGroup().id, deployment().name)}func' | |
| var keyVaultName = 'kv-${appNamePrefix}-${substring(uniqueString(resourceGroup().id, deployment().name), 0, 4)}' |
I prefer creating a deployment name with date and time, instead of reusing the same deployment name. This created the resource above again with a different name.
Describe the solution you'd like
Use something constant but unique when generating the names.
Describe alternatives you've considered
- Remove
deployment().idfrom the lines above.
Additional context
Re-deploy can happen for various reasons, maybe to add and change tags.
I can make a PR if you agree.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request