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

Connecting Vault

  1. Navigate to Settings → Vault
  2. Expand the HashiCorp Vault Integration panel
  3. Enter your Vault configuration:
FieldDescriptionExample
Vault AddressFull URL of your Vault instancehttps://vault.example.com
Auth MethodHow to authenticateToken or AppRole
TokenVault token (if Token auth)hvs.CAESIJl...
Role IDAppRole role ID (if AppRole auth)db02de05-...
Secret IDAppRole secret ID (if AppRole auth)6a174c20-...
Secret Engine PathKV v2 mount pathsecret
  1. 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

  1. After connecting, use the Browse field to navigate Vault paths
  2. Enter a path like deployifynow/api and click Browse
  3. Available keys are listed
  4. Click Link as Env Var next to a key
  5. The variable is created with Source: VaultReference and the path/key stored

Syncing Vault Secrets

When you click Sync variables:

  1. Variables with Source: VaultReference are resolved by reading from Vault
  2. The resolved value replaces the encrypted placeholder
  3. 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

  1. Expand the Vault panel
  2. Click Disconnect Vault
  3. Existing VaultReference variables remain but won't resolve on next sync

Troubleshooting

IssueSolution
Connection failedCheck Vault address is reachable from the API server. Verify token is valid
Permission deniedEnsure the token/role has read and list capabilities on the secret path
Secret not foundVerify the path exists in Vault. KV v2 paths are prefixed with data/ internally
Token expiredRenew the token or use AppRole for automatic rotation