Merge pull request #4991 from hashicorp/private_to_sensitive

rename private to be in line with tfe
This commit is contained in:
Matthew Hooker 2017-06-08 15:43:44 -07:00 committed by GitHub
commit 934c7dae35
3 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ func (c *PushCommand) Run(args []string) int {
flags.StringVar(&message, "message", "", "message")
flags.StringVar(&name, "name", "", "name")
flags.BoolVar(&create, "create", false, "create (deprecated)")
flags.Var((*sliceflag.StringFlag)(&privVars), "private", "")
flags.Var((*sliceflag.StringFlag)(&privVars), "sensitive", "")
if err := flags.Parse(args); err != nil {
return 1
}
@ -205,7 +205,7 @@ func (c *PushCommand) Run(args []string) int {
}
// Collect the variables from CLI args and any var files
if privs := flags.Lookup("private"); privs != nil {
if privs := flags.Lookup("sensitive"); privs != nil {
pvf := privs.Value.(*sliceflag.StringFlag)
pvars := []string(*pvf)
uploadOpts.PrivVars = pvars
@ -310,7 +310,7 @@ Options:
-token=<token> The access token to use to when uploading
-private='var1,var2' List of variables to mark as sensitive in Atlas UI.
-sensitive='var1,var2' List of variables to mark as sensitive in Atlas UI.
-var 'key=value' Variable for templates, can be used multiple times.

View File

@ -208,7 +208,7 @@ func TestPush_vars(t *testing.T) {
"-var", "one=two",
"-var-file", filepath.Join(testFixture("push-vars"), "vars.json"),
"-var", "overridden=yes",
"-private", "super,secret",
"-sensitive", "super,secret",
filepath.Join(testFixture("push-vars"), "template.json"),
}
if code := c.Run(args); code != 0 {

View File

@ -44,10 +44,10 @@ configuration using the options below.
`hashicorp/precise64`, which follows the form `<username>/<buildname>`. This
must be specified here or in your template.
- `-private` - A comma-separated list of variables that should be marked as
- `-sensitive` - A comma-separated list of variables that should be marked as
sensitive in the Terraform Enterprise ui. These variables' keys will be
visible, but their values will be redacted. example usage:
`-var 'supersecretpassword=mypassword' -private=supersecretpassword1`
`-var 'supersecretpassword=mypassword' -sensitive=supersecretpassword1`
- `-var` - Set a variable in your packer template. This option can be used
multiple times. This is useful for setting version numbers for your build.