cyberark / conjur-cli-go

CyberArk Conjur command line interface (Go)
Apache License 2.0
4 stars 2 forks source link

Update variable get to retrieve multiple variables #114

Closed rpothier closed 1 year ago

rpothier commented 1 year ago

Desired Outcome

The variable get command should support getting multiple variables.

Implemented Changes

Updated the variable command to support multiple variables. Updated go.mod to pull in the latest api that includes the latest hostfactory ID parser.

Getting a single variable will print out the variable as before

root@addd497790bd:/home/rob/cyberark/conjur-cli-go#  conjur variable get -i secret
George

Getting multiple secrets will print out the secret and the full variable name

root@0d7803c6039d:/home/rob/cyberark/conjur-cli-go# conjur variable get -i secret,top-secret
{
    "secret": "George"
    "top-secret": "Astro"
}

Note: The Python CLI requires the two variables to be separated by a space, and the conjur CLI requires a comma

Connected Issue/Story

CyberArk internal issue ID: ONYX-33517

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be merged.

Changelog

Test coverage

Documentation

Behavior

Security

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit ab791708 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 81.1% (0.2% change).

View more on Code Climate.