VAULT-ASSOCIATE-002 · Question #43
Which statement describes the results of this command: $ vault secrets enable - version=2 kv (Choose two.)
The correct answer is C. Enables the secrets engine at path kv/ E. Enables K/V v2 secrets engine. The command vault secrets enable -version=2 kv enables a Key/Value Version 2 secrets engine at the specified path kv/.
Question
Options
- AEnables the secrets engine at path kv2/
- BThe -version is an invalid flag
- CEnables the secrets engine at path kv/
- DEnables K/V v1 secrets engine
- EEnables K/V v2 secrets engine
How the community answered
(33 responses)- A9% (3)
- B3% (1)
- C85% (28)
- D3% (1)
Why each option
The command `vault secrets enable -version=2 kv` enables a Key/Value Version 2 secrets engine at the specified path `kv/`.
The command `vault secrets enable -version=2 kv` mounts the secrets engine at `kv/`, not `kv2/`, unless `kv2` was explicitly given as the path.
The `-version` flag is a valid and necessary flag when enabling a specific version of a secrets engine, such as KV v2.
When enabling a secrets engine, Vault automatically mounts it at the specified path. In this case, `kv` refers to the mount path, so the engine is enabled at `kv/`.
The `-version=2` flag explicitly enables K/V v2, not K/V v1; K/V v1 is enabled by default if no version is specified.
The `-version=2` flag explicitly specifies that the Key/Value (KV) secrets engine should be enabled as version 2, which offers features like versioning and check-in/check-out.
Concept tested: Vault K/V secrets engine enablement and versioning
Source: https://developer.hashicorp.com/vault/docs/secrets/kv/kv-v2
Topics
Community Discussion
No community discussion yet for this question.