HashiCorp Certified: Vault Associate (002) — Question 14
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"?
Answer options
- A. vault kv put secret/my-secrets/my-password 53cr3t
- B. vault kv write secret/my-secrets/my-password 53cr3t
- C. vault kv write 53cr3t my-secrets/my-password
- D. vault kv put secret/my-secrets my-password-53cr3t
Correct answer: D
Explanation
The correct answer is D because it correctly uses the 'vault kv put' command to set a secret at the specified path with the key-value pair formatted accurately. Options A and B are incorrect as they do not specify the correct format for setting a secret, and option C has an improper command structure, lacking the path context.