-
Notifications
You must be signed in to change notification settings - Fork 0
/
bin.js
48 lines (47 loc) · 1.03 KB
/
bin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const argv = require("yargs")
.option("approle-file", {
alias: "a",
demandOption: true,
description: "AppRole credentials file",
requiresArg: true,
type: "string"
})
.option("vault-endpoint", {
alias: "v",
demandOption: true,
description: "Vault endpoint URL",
requiresArg: true,
type: "string"
})
.option("vault-path", {
alias: "p",
demandOption: true,
description: "Vault secret path",
requiresArg: true,
type: "string"
})
.option("vault-key", {
alias: "k",
demandOption: true,
description: "Vault secret key",
requiresArg: true,
type: "string"
})
.option("secret-name", {
alias: "n",
demandOption: true,
description: "Docker secret name",
requiresArg: true,
type: "string"
})
.usage(
"$0 --approle-file=FILE --vault-endpoint=ENDPOINT --vault-path=PATH --vault-key=KEY --secret-name=NAME"
)
.help().argv;
require(".")(
argv.approleFile,
argv.vaultEndpoint,
argv.vaultPath,
argv.vaultKey,
argv.secretName
);