HCVA0-003 practice question 2 of 35

You have multiple Vault clusters in your environment, one for test and one for production. You have the CLI installed on your local machine and need to target the production cluster to make configuration changes. What environment variable can you set to target the production cluster?

Full set: 285 questions
Answer options
A: VAULT_REDIRECT_ADDR
B: VAULT_CLUSTER_ADDR
C: VAULT_ADDR Correct answer
D: VAULT_CAPATH
Correct Answer:
C. VAULT_ADDR
Explanation

The VAULTADDR environment variable is used by the Vault command-line interface (CLI) and client libraries to determine the network address of the target Vault server. By setting export VAULTADDR="" in the shell, all subsequent vault commands will be directed to the specified production cluster. This is the standard and primary method for a client to target a specific Vault instance without having to use the -address flag on every command.

Why Incorrect

A. VAULTREDIRECTADDR: This is a server-side configuration variable used by a standby node to redirect client requests to the active Vault node within a High Availability (HA) cluster.
B. VAULTCLUSTERADDR: This is a server-side configuration variable used by a Vault server to advertise its address to other servers for internal cluster communication and request forwarding.
D. VAULTCAPATH: This client-side variable specifies the path to a directory of CA certificates for verifying the Vault server's TLS certificate, not for defining the server's address.

References

1. HashiCorp Vault Official Documentation, "Command-Line Interface (CLI) - Environment Variables": This document explicitly lists VAULTADDR as the variable for specifying "The address of the Vault server." It also describes the other variables, confirming their incorrectness for this scenario.

Source: HashiCorp Vault Documentation

Section: vault Command > Environment Variables > VAULTADDR

Reference: developer.hashicorp.com/vault/docs/commands#environment-variables

2. HashiCorp Vault Official Documentation, "Configuration - listener stanza": This documentation details server-side configuration, including clusteraddr and redirectaddr, confirming they are not client-side variables for targeting a cluster.

Source: HashiCorp Vault Documentation

Section: Configuration > listener stanza > clusteraddress and redirectaddress

Reference: developer.hashicorp.com/vault/docs/configuration/listener/tcp#clusteraddress and developer.hashicorp.com/vault/docs/configuration/listener/tcp#redirectaddress

Scroll to Top