From 89e5ee3c80b90e28cd9fb025602e1c7e13171b40 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Tue, 16 Mar 2021 15:44:21 -0700 Subject: [PATCH] Fix BDC deployment removing all security settings from config (#14756) --- .../resource-deployment/src/services/azdataService.ts | 2 +- .../src/services/bigDataClusterDeploymentProfile.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/resource-deployment/src/services/azdataService.ts b/extensions/resource-deployment/src/services/azdataService.ts index afcb8a919a..ce2c4c882d 100644 --- a/extensions/resource-deployment/src/services/azdataService.ts +++ b/extensions/resource-deployment/src/services/azdataService.ts @@ -61,7 +61,7 @@ export class AzdataService implements IAzdataService { const env: NodeJS.ProcessEnv = {}; // azdata requires this environment variables to be set env['ACCEPT_EULA'] = 'yes'; - await this.platformService.runCommand(`azdata bdc config init --source ${profileName} --target ${profileName} --force`, { workingDirectory: this.platformService.storagePath(), additionalEnvironmentVariables: env }); + await this.platformService.runCommand(`azdata bdc config init --source ${profileName} --path ${profileName} --force`, { workingDirectory: this.platformService.storagePath(), additionalEnvironmentVariables: env }); const configObjects = await Promise.all([ this.getJsonObjectFromFile(path.join(this.platformService.storagePath(), profileName, 'bdc.json')), this.getJsonObjectFromFile(path.join(this.platformService.storagePath(), profileName, 'control.json')) diff --git a/extensions/resource-deployment/src/services/bigDataClusterDeploymentProfile.ts b/extensions/resource-deployment/src/services/bigDataClusterDeploymentProfile.ts index 32bd38756d..fee5d21d9b 100644 --- a/extensions/resource-deployment/src/services/bigDataClusterDeploymentProfile.ts +++ b/extensions/resource-deployment/src/services/bigDataClusterDeploymentProfile.ts @@ -270,10 +270,10 @@ export class BigDataClusterDeploymentProfile { } public setAuthenticationMode(mode: string): void { - // If basic authentication is picked, the security section must be removed + // If basic authentication is picked, the activeDirectory security section must be removed // otherwise azdata will throw validation error - if (mode === AuthenticationMode.Basic && 'security' in this._controlConfig) { - delete this._controlConfig.security; + if (mode === AuthenticationMode.Basic && 'security' in this._controlConfig && 'activeDirectory' in this._controlConfig.security) { + delete this._controlConfig.security.activeDirectory; } }