Terraform Environment Variables
Every provider argument can be supplied via an environment variable. Using environment variables keeps secrets out of your .tf files and Terraform state.
| Variable | Provider argument | Required | Description |
|---|---|---|---|
WEBHOOKR_API_URL | api_url | Yes | Webhookr API base URL, e.g. https://api.webhookr.tech. |
WEBHOOKR_API_TOKEN | api_token | Conditional | API token (whk_…). Mutually exclusive with the Firebase variables. |
WEBHOOKR_FIREBASE_API_KEY | firebase_api_key | Conditional | Firebase Web API key. |
WEBHOOKR_SERVICE_ACCOUNT_EMAIL | service_account_email | Conditional | Service account email (name@project.iam.gserviceaccount.com). |
WEBHOOKR_SERVICE_ACCOUNT_KEY | service_account_key | Conditional | Service account RSA private key, in PEM format. |
Authentication rules
- Provide either
WEBHOOKR_API_TOKENor the threeWEBHOOKR_FIREBASE_*/ service account variables — never both. - When
WEBHOOKR_API_TOKENis set, the Firebase variables are ignored, even if exported. This prevents a false Conflicting authentication error in shared environments. - The three Firebase variables are required together.
Example
export WEBHOOKR_API_URL="https://api.webhookr.tech"
export WEBHOOKR_API_TOKEN="whk_xxxxxxxxxxxxxxxxxxxxxxxx"
terraform plan