diff --git a/command/format.go b/command/format.go index 93b812312e..ee7145249a 100644 --- a/command/format.go +++ b/command/format.go @@ -129,12 +129,17 @@ func (t TableFormatter) OutputSecret(ui cli.Ui, secret, s *api.Secret) error { input = append(input, fmt.Sprintf("Key %s Value", config.Delim)) + input = append(input, fmt.Sprintf("--- %s -----", config.Delim)) + if s.LeaseDuration > 0 { if s.LeaseID != "" { input = append(input, fmt.Sprintf("lease_id %s %s", config.Delim, s.LeaseID)) + input = append(input, fmt.Sprintf( + "lease_duration %s %d", config.Delim, s.LeaseDuration)) + } else { + input = append(input, fmt.Sprintf( + "refresh_interval %s %d", config.Delim, s.LeaseDuration)) } - input = append(input, fmt.Sprintf( - "lease_duration %s %d", config.Delim, s.LeaseDuration)) if s.LeaseID != "" { input = append(input, fmt.Sprintf( "lease_renewable %s %s", config.Delim, strconv.FormatBool(s.Renewable)))