How to modify/update or remove/delete credentials with the command line utility tw_vault_control? |
Before going further, please note that the preferred method to modify/delete credentials is to use the rest apis. 1) Find the id of the relevant credential to delete using the following command line: tw_vault_control --show --type=aws 2) Create a JSON file for a specific credential ID: tw_vault_control --show --id=82c47635cd5395765f160a65003d393a --json >> aws.json or, just dump all of the AWS credentials to the json file, like this: tw_vault_control --show --type=aws --json >> aws.json 3) Edit the JSON file with new info, and remove all occurrences of "*MASKED*" tw_vault_control --update aws.json This step could be automated with a custom script (not provided in this article). 2- DELETE:
Example modification of a 'vCenter' credential:
1) Find the id of the relevant credential to delete using the following command line:
tw_vault_control --type=vcenter -S
b520a83a82e36b91e12c7f00010125f0
[...] label = "this is the label of the credential that the user wants to delete" 2) Run the following command line to remove the credential
tw_vault_control --id=b520a83a82e36b91e12c7f00010125f0 --remove
Note: The user may also be interested into the KA 000392619: Discovery: How to export or import credentials through command line |