Skip to main content

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.

VariableProvider argumentRequiredDescription
WEBHOOKR_API_URLapi_urlYesWebhookr API base URL, e.g. https://api.webhookr.tech.
WEBHOOKR_API_TOKENapi_tokenConditionalAPI token (whk_…). Mutually exclusive with the Firebase variables.
WEBHOOKR_FIREBASE_API_KEYfirebase_api_keyConditionalFirebase Web API key.
WEBHOOKR_SERVICE_ACCOUNT_EMAILservice_account_emailConditionalService account email (name@project.iam.gserviceaccount.com).
WEBHOOKR_SERVICE_ACCOUNT_KEYservice_account_keyConditionalService account RSA private key, in PEM format.

Authentication rules

  • Provide either WEBHOOKR_API_TOKEN or the three WEBHOOKR_FIREBASE_* / service account variables — never both.
  • When WEBHOOKR_API_TOKEN is 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