HashiCorp Vault Integration
Connect HashiCorp Vault to manage secrets centrally. Environment variables can reference Vault paths, and values are resolved when syncing deployment variables.
What does this integration do?
DeployifyNow connects to an existing HashiCorp Vault KV v2 secrets engine using Token or AppRole authentication. It stores a path and key as a Vault reference on an environment variable, then reads the value when you synchronize variables to a deployment environment. Connecting Vault does not install a Vault server or automatically migrate your existing environment variables.
This integration is available on Plus and Pro. You still operate your Vault instance and grant access to the required secret paths. See environment variables for the service configuration workflow and pricing for current plan details.
When do secret changes reach my application?
Vault values are resolved during Sync variables, rather than read from Vault on every application request. After changing a secret in Vault, synchronize the relevant deployment environment and follow the service's deployment workflow to apply the updated configuration. Do not assume that changing a Vault value alone has updated a running application.
Prerequisites
- A workspace on the Plus or Pro plan. Vault connection is not available on Free.
- A running HashiCorp Vault instance (v1.12+)
- KV v2 secrets engine enabled
- Authentication credentials (Token or AppRole)
Connecting Vault
- Navigate to Settings → Vault
- Expand the HashiCorp Vault Integration panel
- Enter your Vault configuration:
| Field | Description | Example |
|---|---|---|
| Vault Address | Full URL of your Vault instance | https://vault.example.com |
| Auth Method | How to authenticate | Token or AppRole |
| Token | Vault token (if Token auth) | hvs.CAESIJl... |
| Role ID | AppRole role ID (if AppRole auth) | db02de05-... |
| Secret ID | AppRole secret ID (if AppRole auth) | 6a174c20-... |
| Secret Engine Path | KV v2 mount path | secret |
- Click Test & Connect
The system verifies connectivity by calling Vault's health endpoint.
Authentication Methods
Token Authentication
Simplest setup. Provide a Vault token with read access to your secrets.
# Create a policy
vault policy write deployifynow - <<EOF
path "secret/data/deployifynow/*" {
capabilities = ["read", "list"]
}
EOF
# Create a token
vault token create -policy=deployifynow -period=768h
AppRole Authentication
Recommended for production. More secure, supports token rotation.
# Enable AppRole
vault auth enable approle
# Create role
vault write auth/approle/role/deployifynow \
token_policies="deployifynow" \
token_ttl=1h \
token_max_ttl=4h
# Get role ID
vault read auth/approle/role/deployifynow/role-id
# Generate secret ID
vault write -f auth/approle/role/deployifynow/secret-id
Linking Vault Secrets to Environment Variables
- After connecting, use the Browse field to navigate Vault paths
- Enter a path like
deployifynow/apiand click Browse - Available keys are listed
- Click Link as Env Var next to a key
- The variable is created with
Source: VaultReferenceand the path/key stored
Syncing Vault Secrets
When you click Sync variables:
- Variables with
Source: VaultReferenceare resolved by reading from Vault - The resolved value replaces the encrypted placeholder
- All variables (manual + vault-resolved) are sent to the selected deployment environment
Vault Path Structure
Recommended layout:
secret/
deployifynow/
api/
DATABASE_URL = postgres://...
STRIPE_SECRET_KEY = <secret-store-reference>
auth/
SESSION_SECRET = ...
OAUTH_CLIENT_SECRET = ...
Disconnecting Vault
- Expand the Vault panel
- Click Disconnect Vault
- Existing VaultReference variables remain but won't resolve on next sync
Troubleshooting
| Issue | Solution |
|---|---|
| Connection failed | Check Vault address is reachable from the API server. Verify token is valid |
| Permission denied | Ensure the token/role has read and list capabilities on the secret path |
| Secret not found | Verify the path exists in Vault. KV v2 paths are prefixed with data/ internally |
| Token expired | Renew the token or use AppRole for automatic rotation |