VAULT-ASSOCIATE practice question 12 of 15
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"?
Full set: 57 questionsThe correct command syntax to write data to the Key-Value (KV) secrets engine is vault kv put PATH KEY=VALUE.
- The secrets engine is mounted at secret.
- The path for the secret is my-secrets.
- The key is my-password.
- The value is 53cr3t. Combining these elements results in the command: vault kv put secret/my-secrets my-password=53cr3t. Option D is the only choice that correctly identifies secret/my-secrets as the path and separates it from the key-value data, despite the apparent typo.
A. This command incorrectly appends the intended key (my-password) to the path and fails to use the required key=value format for the data.
B. This command uses the write alias for put but makes the same syntactical error as option A, confusing the path and the data payload.
C. This command has the arguments in the wrong order. The path must come before the key-value data, and the data must be in key=value format.
1. HashiCorp Vault Official Documentation, CLI Commands, kv put: The documentation specifies the command usage as vault kv put [options] PATH KEY=VALUE [KEY=VALUE ...]. This confirms that the path (secret/my-secrets) must be followed by one or more key-value pairs in the KEY=VALUE format.
- Source: HashiCorp, "Vault Commands (CLI) - vault kv put", Vault Documentation. Accessed under the "Command Usage" section.
2. HashiCorp Learn, "Static Secrets: Key/Value Secrets Engine" Tutorial: This official tutorial provides practical examples of writing secrets. For instance, vault kv put secret/webapp/config username="static-user" password="static-password". This example clearly separates the path (secret/webapp/config) from the key-value pairs, reinforcing the correct structure found in option D.
- Source: HashiCorp Learn, "Static Secrets: Key/Value Secrets Engine", Step 2: "Write a Secret".
Keep practicing
Take the free VAULT-ASSOCIATE practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other VAULT-ASSOCIATE practice questions
- Question 1To give a role the ability to display or output all of the end points under the /secrets/…
- Question 4Which of the following cannot define the maximum time-to-live (TTL) for a token?
- Question 6What can be used to limit the scope of a credential breach?
- Question 8What is the Vault CLI command to query information about the token the client is currentl…
- Question 10When unsealing Vault, each Shamir unseal key should be entered:
- Question 11You have a 2GB Base64 binary large object (blob) that needs to be encrypted. Which of the…
