ExamGecko
Question list
Search
Search

Question 20 - Vault Associate 002 discussion

Report
Export

What command creates a secret with the key 'my-password' and the value '53cr3t' at path 'my-secrets' within the KV secrets engine mounted at 'secret'?

A.
vault kv put secret/my-secrets/my-password 53cr3t
Answers
A.
vault kv put secret/my-secrets/my-password 53cr3t
B.
vault kv write secret/my-secrets/my-password 53cr3t
Answers
B.
vault kv write secret/my-secrets/my-password 53cr3t
C.
vault kv write 53cr3t my-secrets/my-password
Answers
C.
vault kv write 53cr3t my-secrets/my-password
D.
vault kv put secret/my-secrets y-password-53cr3t
Answers
D.
vault kv put secret/my-secrets y-password-53cr3t
Suggested answer: A

Explanation:

The vault kv put command writes the data to the given path in the K/V secrets engine. The command requires the mount path of the K/V secrets engine, the secret path, and the key-value pair to store. The mount path can be specified with the -mount flag or as part of the secret path. The key-value pair can be given as an argument or read from a file or stdin. The correct syntax for the command is:

vault kv put -mount=secret my-secrets/my-password 53cr3t

or

vault kv put secret/my-secrets my-password=53cr3t

The other options are incorrect because they use the deprecated vault kv write command, or they have the wrong order or format of the arguments.Reference: https://developer.hashicorp.com/vault/docs/commands/kv/put3, https://developer.hashicorp.com/vault/docs/commands/kv4

asked 18/09/2024
Allen Yang
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first