Courseiva
Utilize Vault CLI and APIeasyMultiple ChoiceObjective-mapped

VA-003 Utilize Vault CLI and API Practice Question

An administrator has created a policy file named 'app-policy.hcl'. Which command should they use to upload this policy to Vault?

⚠ Common exam trap

HashiCorp often tests the exact CLI syntax for Vault policy management, and the trap here is that candidates confuse the generic `vault write` API call with the dedicated `vault policy write` command, or they invent non-existent commands like `vault create policy` or `vault set policy`.

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 policy write app-policy app-policy.hcl

The `vault policy write` command is the standard Vault CLI command to create or update a policy from a file. The syntax `vault policy write <name> <path>` reads the HCL or JSON policy definition from the specified file and writes it to Vault's policy storage.

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 sys/policy/app-policy @app-policy.hcl

    Why it's wrong here

    While this API call works, the CLI command is 'vault policy write'.

  • vault create policy app-policy app-policy.hcl

    Why it's wrong here

    'vault create' is not a valid command.

  • vault set policy app-policy app-policy.hcl

    Why it's wrong here

    'vault set' is not a valid command.

  • vault policy write app-policy app-policy.hcl

    Why this is correct

    This is the correct CLI command to write a policy.

About these practice questions

One of 498 original VA-003 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.