Environment Variables
You can attach environment variables to any endpoint. These are injected into the command’s environment at runtime, alongside any managed secrets.
Setting env vars
Section titled “Setting env vars”From the dashboard
Section titled “From the dashboard”Open Dashboard → Endpoints, click an endpoint, and scroll to the Environment section. Add key-value pairs. Keys must be UPPER_SNAKE_CASE.
From wrapd.yaml
Section titled “From wrapd.yaml”endpoints: - name: deploy method: POST command: ./deploy.sh env: DEPLOY_ENV: production REGION: us-east-1How env vars are resolved
Section titled “How env vars are resolved”When a command runs, environment variables are merged in this order (later values win):
- System environment — the agent process’s own environment
- Managed secrets — injected from the dashboard when the agent connects
- Endpoint env — the key-value pairs you defined on the endpoint
- Pipeline env — if the endpoint is running as a pipeline step, those vars override all others
Referencing managed secrets
Section titled “Referencing managed secrets”You can reference managed secrets using the $wrapd: prefix. See Managed Secrets for details.