VA-003 Utilize Vault CLI and API Practice Question
Exhibit
$ vault secrets enable -path=shared -version=2 kv
Refer to the exhibit. A user wants to write a secret 'db_password' with value 's3cret' to this secrets engine. Which CLI command should be used?
⚠ Common exam trap
HashiCorp often tests the distinction between KV v1 and v2 paths, and the trap here is that candidates assume the secret can be written directly to the mount path (e.g., 'shared/db_password') without the '/data/' prefix, which only works in KV v1.
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 write shared/data/db_password value=s3cret
In Vault's KV v2 secrets engine, secrets are stored under the 'data' path. The correct CLI command to write a secret is 'vault write shared/data/db_password value=s3cret', which targets the data endpoint for the secret 'db_password' in the 'shared' mount.
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 write shared/db_password value=s3cret
Why it's wrong here
This is incorrect because writing directly to 'shared/db_password' without the '/data/' prefix is the syntax for KV v1. Since the exhibit likely shows a KV v2 engine, this path does not exist for writing secrets; it would be the metadata path for v2.
- ✓
vault write shared/data/db_password value=s3cret
Why this is correct
This is correct because in Vault's KV v2 secrets engine, secrets are written to the 'data' sub-path. The command 'vault write shared/data/db_password value=s3cret' targets the data endpoint for the secret 'db_password' under the 'shared' mount.
- ✗
vault write shared/metadata/db_password value=s3cret
Why it's wrong here
This is incorrect because the 'metadata' sub-path is used for reading and writing metadata about a secret, not the secret itself. Writing to '/metadata/' would not store the secret value correctly.
- ✗
vault write shared/config/db_password value=s3cret
Why it's wrong here
This is incorrect because 'config' is a system path used for configuring the secrets engine mount itself, such as setting the maximum versions, not for storing secrets.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
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.