-
Notifications
You must be signed in to change notification settings - Fork 160
feat: Added Azure Naming Service #221
Conversation
src/services/namingService.ts
Outdated
| if (suffix) { | ||
| name += `-${suffix}`; | ||
| } | ||
| return name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of a great reason why, but would we want to .toLowerCase() this, just to normalize? Also, guessing it's unsupported, but has anyone tried extended ascii or double-byte chars?
nvm.. i think this is answered in getSafeResourceName below...
|
LGTM - thanks for centralizing this logic and updating across the board 👍 |
mydiemho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nit suggestion
src/services/baseService.ts
Outdated
| return `${deploymentName | ||
| .replace("rg-deployment", "artifact") | ||
| .replace("deployment", "artifact")}.zip`; | ||
| .replace(`rg-${configConstants.naming.suffix.deployment}`, configConstants.naming.suffix.artifact) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extract configConstants.naming.suffix.deployment and configConstants.naming.suffix.artifact into local variables
wbreza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/services/baseService.ts
Outdated
| this.resourceGroup = this.getResourceGroupName(); | ||
| this.deploymentConfig = this.getDeploymentConfig(); | ||
| this.deploymentName = this.getDeploymentName(); | ||
| this.storageAccountName = StorageAccountResource.getResourceName( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can likely just keep this as 1 line now.
77804a1 to
17a026d
Compare
17a026d to
92e8d0f
Compare
- [x] Add `AzureNamingService` - [x] Move naming utils to naming service - [x] Added `getSafeResourceName` - used by `storageAccount` and `deploymentName` Resolves [AB#597]
AzureNamingServicegetSafeResourceName- used bystorageAccountanddeploymentNameResolves [AB#597]