Skip to content

Commit

Permalink
Merge pull request #84 from baoduy/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
baoduy authored Sep 6, 2024
2 parents 1003e40 + d9296f3 commit 61be268
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
17 changes: 8 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@types/chai": "^4.3.19",
"@types/mocha": "^10.0.7",
"@types/netmask": "^2.0.5",
"@types/node": "^22.5.2",
"@types/node": "^22.5.4",
"@types/node-forge": "^1.3.11",
"chai": "^5.1.1",
"cpy-cli": "^5.0.0",
Expand All @@ -58,7 +58,7 @@
"@drunk-pulumi/azure-providers": "^1.0.6",
"@pulumi/azure-native": "^2.59.0",
"@pulumi/azuread": "5.53.3",
"@pulumi/pulumi": "^3.130.0",
"@pulumi/pulumi": "^3.131.0",
"@pulumi/random": "^4.16.3",
"@pulumi/tls": "^5.0.4",
"netmask": "^2.0.2",
Expand Down
15 changes: 14 additions & 1 deletion src/Builder/ServiceBusBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { naming, isPrd } from '../Common';
import * as bus from '@pulumi/azure-native/servicebus/v20230101preview';
import { addEncryptKey } from '../KeyVault/Helper';
import { addCustomSecrets } from '../KeyVault/CustomHelper';
import { addCustomSecret, addCustomSecrets } from '../KeyVault/CustomHelper';
import { ServiceBusPrivateLink } from '../VNet';

const defaultQueueOptions: types.ServiceBusQueueArgs = {
Expand Down Expand Up @@ -174,6 +174,19 @@ class ServiceBusBuilder
dependsOn: this._sbInstance,
}),
);

//Add ServiceBus endpoint to vault
if (vaultInfo) {
addCustomSecret({
name: `${this._instanceName}-endpoint`,
dependsOn: this._sbInstance,
contentType: `Service Bus ${this._instanceName}`,
value: this._sbInstance!.serviceBusEndpoint.apply(
(e) => new URL(e).hostname,
),
vaultInfo,
});
}
}

private buildNetwork() {
Expand Down
1 change: 1 addition & 0 deletions src/Common/Naming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const rules = {
},
getServiceBusName: {
cleanName: true,
includeOrgName: true,
maxLength: 80,
suffix: 'bus',
},
Expand Down

0 comments on commit 61be268

Please sign in to comment.