variable

Use the variable command to manage Conjur Cloud variables.

Usage

 
conjur [global options] variable <subcommand> [options] [args]

Global options

Option

Description

-d, --debug

Enable debugging output.

variable get

Use the get subcommand to get the value of one or more Conjur Cloud variables.

Usage

 
conjur [global options] variable get [options] [args]

Options

Option

Description

-i VALUE, --id VALUE

Provide the variable identifier.

--version VALUE

(Optional) Specify the desired version of a single variable value.

-h, --help

Display the help screen.

Examples

  • The following command gets the most recent value of the variable secrets/mysecret:

     
     conjur variable get -i data/secrets/mysecret
  • The following command gets the second version of the variable secrets/mysecret:

     
    conjur variable get -i data/secrets/mysecret --version 2
  • The following command gets the value of more than one variable at a time using the get command.

     
    conjur variable get -i variable_name1 variable_name2

variable set

Use the set subcommand to set the value of a Conjur Cloud variable.

Usage

 
conjur [global options] variable set [options] [args]

Options

Option

Description

-i VALUE, --id VALUE

Provide the variable identifier.

-v VALUE, --value VALUE

Set the value of the specified variable.

-h, --help

Display the help screen.

Example

The following command sets the value of the variable secrets/mysecret to my_secret_value:

 
conjur variable set -i data/secrets/mysecret -v my_secret_value