Skip to content

Commit b8baf4d

Browse files
authored
feat(azure): require that client id and secret are set via env vars (#3525)
1 parent e2b52b6 commit b8baf4d

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

packages/artillery/lib/cmds/run-aci.js

+1-11
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ class RunACICommand extends Command {
2727
`subscription-id=${flags['subscription-id']}`,
2828
`storage-account=${flags['storage-account']}`,
2929
`blob-container=${flags['blob-container']}`,
30-
`resource-group=${flags['resource-group']}`,
31-
`client-id=${flags['client-id']}`,
32-
`client-secret=${flags['client-secret']}`
30+
`resource-group=${flags['resource-group']}`
3331
];
3432

3533
RunCommand.runCommandImplementation(flags, argv, args);
@@ -82,14 +80,6 @@ RunACICommand.flags = {
8280
'resource-group': Flags.string({
8381
description:
8482
'Azure Resource Group name. May also be set via AZURE_RESOURCE_GROUP environment variable.'
85-
}),
86-
'client-id': Flags.string({
87-
description:
88-
'Azure app client ID. May also be set via AZURE_CLIENT_ID environment variable.'
89-
}),
90-
'client-secret': Flags.string({
91-
description:
92-
'Azure app client secret. May also be set via AZURE_CLIENT_SECRET environment variable.'
9383
})
9484
};
9585

packages/artillery/lib/platform/az/aci.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ class PlatformAzureACI {
4444
this.azureSubscriptionId =
4545
process.env.AZURE_SUBSCRIPTION_ID ||
4646
platformOpts.platformConfig['subscription-id'];
47-
this.azureClientId =
48-
process.env.AZURE_CLIENT_ID || platformOpts.platformConfig['client-id'];
49-
this.azureClientSecret =
50-
process.env.AZURE_CLIENT_SECRET ||
51-
platformOpts.platformConfig['client-secret'];
47+
this.azureClientId = process.env.AZURE_CLIENT_ID;
48+
this.azureClientSecret = process.env.AZURE_CLIENT_SECRET;
5249

5350
this.storageAccount =
5451
process.env.AZURE_STORAGE_ACCOUNT ||

0 commit comments

Comments
 (0)