Skip to content

Commit

Permalink
Issue 8427: give the qna maker service plan a unique name (#8581)
Browse files Browse the repository at this point in the history
Co-authored-by: natalgar <natalie.garcia@microsoft.com>
  • Loading branch information
natalgar and natalgar authored Sep 2, 2021
1 parent 7c14b7a commit c355633
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,13 @@ export class AzureResourceMananger {
});

// initialize the name
const qnaMakerSearchName = `${config.name}-search`.toLowerCase().replace('_', '');
const qnaMakerWebAppName = `${config.name}-qnahost`.toLowerCase().replace('_', '');
const qnaMakerServiceName = `${config.name}-qna`;
const qnaMakerSearchName = `${qnaMakerServiceName}-search`.toLowerCase().replace('_', '');
const qnaMakerWebAppName = `${qnaMakerServiceName}-qnahost`.toLowerCase().replace('_', '');
const qnaMakerServicePlanName = `${qnaMakerServiceName}-serviceplan`;

// only support westus in qna
if (config.location !== 'westus') {
config.location = 'westus';
}
config.location = 'westus';

// deploy search service
const searchManagementClient = new SearchManagementClient(this.creds, this.subscriptionId, this.options);
Expand Down Expand Up @@ -296,10 +295,9 @@ export class AzureResourceMananger {
// deploy websites
// Create new Service Plan or update the exisiting service plan created before
const webSiteManagementClient = new WebSiteManagementClient(this.creds, this.subscriptionId, this.options);
const servicePlanName = config.resourceGroupName;
const servicePlanResult = await webSiteManagementClient.appServicePlans.createOrUpdate(
config.resourceGroupName,
servicePlanName,
qnaMakerServicePlanName,
{
location: config.location,
sku: {
Expand Down
2 changes: 1 addition & 1 deletion extensions/azurePublish/src/node/provision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export class BotProjectProvision {
provisionResults.qna = await this.azureResourceManagementClient.deployQnAReource({
resourceGroupName: resourceGroupName,
location: config.location ?? provisionResults.resourceGroup.location,
name: `${config.hostname}-qna`,
name: config.hostname,
});
break;

Expand Down

0 comments on commit c355633

Please sign in to comment.