HCVA0-003 practice question 8 of 35
You need to connect to and manage a new HCP Vault cluster using the Vault CLI on your laptop. What environment variables should you set to establish connectivity?
Full set: 285 questionsTo connect the Vault CLI to a HashiCorp Cloud Platform (HCP) Vault cluster, you must specify the cluster's public address and the correct administrative namespace. The VAULTADDR environment variable is used to set the cluster's URL, which typically listens on port 8200. HCP Vault provisions a default namespace named admin for all user-level administrative tasks. Therefore, the VAULTNAMESPACE variable must be set to admin to target this namespace for management operations. These two variables correctly configure the CLI's connection target.
A. This option is missing the VAULTADDR variable, which is mandatory for the CLI to know which Vault server to contact.
B. VAULTNAMESPACE=root is incorrect for managing an HCP cluster, as admin is the designated namespace. VAULTREDIRECTADDR is a server-side configuration for UI logins, not a client-side CLI variable.
D. VAULTCLUSTERADDR is a server-side configuration parameter used for communication between Vault nodes within a cluster, not for client connections. Clients must use VAULTADDR.
1. HashiCorp Developer Documentation, "Get Started with HCP Vault": This official tutorial explicitly instructs users to set these two environment variables for CLI access. It states, "All HCP Vault clusters are created with a default namespace called admin." and provides the commands: export VAULTADDR= and export VAULTNAMESPACE=admin.
Source: HashiCorp, "Connect to the HCP Vault cluster", Get Started with HCP Vault, Section: "Configure the Vault environment variables". (developer.hashicorp.com/vault/tutorials/hcp/hcp-vault-get-started#configure-the-vault-environment-variables)
2. HashiCorp Developer Documentation, "Vault Commands (CLI) - Environment Variables": This document lists the environment variables recognized by the Vault CLI. It defines VAULTADDR as the address of the Vault server and VAULTNAMESPACE as the namespace to use for the request. It does not list VAULTCLUSTERADDR as a client-side variable.
Source: HashiCorp, "Environment Variables", Vault Commands (CLI). (developer.hashicorp.com/vault/docs/commands#environment-variables)
3. HashiCorp Developer Documentation, "Vault Agent - Configuration": The documentation for Vault Agent, another Vault client, clarifies the distinction between vault.address (equivalent to VAULTADDR) for client connections and clusteraddr for server-to-server communication, reinforcing that clients use the former.
Source: HashiCorp, "Vault Agent Configuration", Vault Agent. (developer.hashicorp.com/vault/docs/agent/configuration#vault)
Keep practicing
Take the free HCVA0-003 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other HCVA0-003 practice questions
- Question 1Which two characters can be used when writing a policy to reflect a wildcard or path segm…
- Question 2You have multiple Vault clusters in your environment, one for test and one for production…
- Question 3Short-lived, dynamically generated secrets provide organizations with many benefits. Sele…
- Question 4When Vault is sealed, which are the only two operations available to a Vault administrato…
- Question 6What is the default method of authentication after first initializing Vault?
- Question 7Which two interfaces automatically assume the token for subsequent requests after success…
