VA-003 Utilize Vault CLI and API Practice Question
A DevOps engineer needs to write a new secret to the KV v2 engine at path 'secret/data/team' with key 'api_key' and value 'abc123'. Which Vault CLI command achieves this?
⚠ Common exam trap
HashiCorp often tests the distinction between 'vault kv put' and 'vault write' for KV v2, where candidates mistakenly use the full API path with 'vault kv put' or the wrong command for the engine version.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
vault kv put secret/team api_key=abc123
The KV v2 engine automatically prefixes the path with 'data/' when using the 'vault kv put' command. The correct path for writing a secret to the KV v2 engine is 'secret/data/team', but the CLI command 'vault kv put secret/team api_key=abc123' handles this internally by appending '/data/' to the path. This is a key difference from the 'vault write' command, which requires the full path including 'data/'.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
vault kv put secret/data/team api_key=abc123
Why it's wrong here
Incorrect because the mount path is 'secret/', so the full path becomes 'secret/team' (the 'data/' is automatically inserted by Vault).
- ✓
vault kv put secret/team api_key=abc123
Why this is correct
Correct command; 'vault kv put' writes to KV v2 engine at the specified path (mount path is 'secret/', the secret is 'team').
- ✗
vault write secret/data/team api_key=abc123
Why it's wrong here
Incorrect; 'vault write' is not the recommended way for KV v2, and the path is redundant.
- ✗
vault write secret/team api_key=abc123
Why it's wrong here
Incorrect command; 'vault write' is generic and not recommended for KV v2. Also, the path should be 'secret/data/team'.
Go deeper
Related to this question
About these practice questions
This VA-003 question is part of Courseiva's 498-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This VA-003 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the VA-003 exam.