You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: internals/secrethub/env_source.go
+85-1Lines changed: 85 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ import (
4
4
"bufio"
5
5
"bytes"
6
6
"errors"
7
+
"fmt"
7
8
"io"
8
9
"io/ioutil"
9
10
"os"
@@ -22,8 +23,19 @@ import (
22
23
"gopkg.in/yaml.v2"
23
24
)
24
25
26
+
typeerrNameCollisionstruct {
27
+
namestring
28
+
firstPathstring
29
+
secondPathstring
30
+
}
31
+
32
+
func (eerrNameCollision) Error() string {
33
+
returnfmt.Sprintf("secrets at path %s and %s map to the same environment variable: %s. Rename one of the secrets or source them in a different way", e.firstPath, e.secondPath, e.name)
clause.Flag("var", "Define the value for a template variable with `VAR=VALUE`, e.g. --var env=prod").Short('v').StringMapVar(&env.templateVars)
54
68
clause.Flag("template-version", "The template syntax version to be used. The options are v1, v2, latest or auto to automatically detect the version.").Default("auto").StringVar(&env.templateVersion)
55
69
clause.Flag("no-prompt", "Do not prompt when a template variable is missing and return an error instead.").BoolVar(&env.dontPromptMissingTemplateVar)
70
+
clause.Flag("secrets-dir", "Recursively include all secrets from a directory. Environment variable names are derived from the path of the secret: `/` are replaced with `_` and the name is uppercased.").StringVar(&env.secretsDir)
56
71
clause.Flag("env", "The name of the environment prepared by the set command (default is `default`)").Default("default").Hidden().StringVar(&env.secretsEnvDir)
0 commit comments