diff --git a/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitFailInvalidWorkingDirectory.ts b/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitFailInvalidWorkingDirectory.ts index 1ee7e7f..c70fc7b 100644 --- a/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitFailInvalidWorkingDirectory.ts +++ b/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitFailInvalidWorkingDirectory.ts @@ -38,7 +38,7 @@ let a: ma.TaskLibAnswers = { } } -tr.registerMock('uuid/v4', () => '123'); +tr.registerMock('uuid/v5', () => '123'); tr.setAnswers(a); tr.run(); \ No newline at end of file diff --git a/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessAdditionalArgs.ts b/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessAdditionalArgs.ts index c1d6363..981e71b 100644 --- a/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessAdditionalArgs.ts +++ b/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessAdditionalArgs.ts @@ -38,7 +38,7 @@ let a: ma.TaskLibAnswers = { } } -tr.registerMock('uuid/v4', () => '123'); +tr.registerMock('uuid/v5', () => '123'); tr.setAnswers(a); tr.run(); \ No newline at end of file diff --git a/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessEmptyWorkingDir.ts b/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessEmptyWorkingDir.ts index 3963052..30c69d7 100644 --- a/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessEmptyWorkingDir.ts +++ b/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessEmptyWorkingDir.ts @@ -38,7 +38,7 @@ let a: ma.TaskLibAnswers = { } } -tr.registerMock('uuid/v4', () => '123'); +tr.registerMock('uuid/v5', () => '123'); tr.setAnswers(a); tr.run(); \ No newline at end of file diff --git a/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessNoAdditionalArgs.ts b/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessNoAdditionalArgs.ts index 1084b72..6a49018 100644 --- a/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessNoAdditionalArgs.ts +++ b/Tasks/TerraformTask/TerraformTaskV4/Tests/InitTests/GCP/GCPInitSuccessNoAdditionalArgs.ts @@ -38,7 +38,7 @@ let a: ma.TaskLibAnswers = { } } -tr.registerMock('uuid/v4', () => '123'); +tr.registerMock('uuid/v5', () => '123'); tr.setAnswers(a); tr.run(); \ No newline at end of file diff --git a/Tasks/TerraformTask/TerraformTaskV4/src/gcp-terraform-command-handler.ts b/Tasks/TerraformTask/TerraformTaskV4/src/gcp-terraform-command-handler.ts index eb110fd..9e02caf 100644 --- a/Tasks/TerraformTask/TerraformTaskV4/src/gcp-terraform-command-handler.ts +++ b/Tasks/TerraformTask/TerraformTaskV4/src/gcp-terraform-command-handler.ts @@ -3,7 +3,7 @@ import {ToolRunner} from 'azure-pipelines-task-lib/toolrunner'; import {TerraformAuthorizationCommandInitializer} from './terraform-commands'; import {BaseTerraformCommandHandler} from './base-terraform-command-handler'; import path = require('path'); -import * as uuidV4 from 'uuid/v4'; +import * as uuidV5 from 'uuid/v5'; export class TerraformCommandHandlerGCP extends BaseTerraformCommandHandler { constructor() { @@ -13,7 +13,7 @@ export class TerraformCommandHandlerGCP extends BaseTerraformCommandHandler { private getJsonKeyFilePath(serviceName: string) { // Get credentials for json file - const jsonKeyFilePath = path.resolve(`credentials-${uuidV4()}.json`); + const jsonKeyFilePath = path.resolve(`credentials-${uuidV5(serviceName, uuidV5.URL)}.json`); let clientEmail = tasks.getEndpointAuthorizationParameter(serviceName, "Issuer", false); let tokenUri = tasks.getEndpointAuthorizationParameter(serviceName, "Audience", false); diff --git a/Tasks/TerraformTask/TerraformTaskV4/task.json b/Tasks/TerraformTask/TerraformTaskV4/task.json index 919c071..b622dc9 100644 --- a/Tasks/TerraformTask/TerraformTaskV4/task.json +++ b/Tasks/TerraformTask/TerraformTaskV4/task.json @@ -14,7 +14,7 @@ "demands": [], "version": { "Major": "4", - "Minor": "228", + "Minor": "236", "Patch": "0" }, "instanceNameFormat": "Terraform : $(provider)", diff --git a/Tasks/TerraformTask/TerraformTaskV4/task.loc.json b/Tasks/TerraformTask/TerraformTaskV4/task.loc.json index 4bd74ce..e344f65 100644 --- a/Tasks/TerraformTask/TerraformTaskV4/task.loc.json +++ b/Tasks/TerraformTask/TerraformTaskV4/task.loc.json @@ -13,7 +13,7 @@ "demands": [], "version": { "Major": "4", - "Minor": "228", + "Minor": "236", "Patch": "0" }, "instanceNameFormat": "ms-resource:loc.instanceNameFormat",