When one service needs to call another, Qovery automatically generates built-in variables exposing each service’s hostname. In Terraform, you expose those variables to a dependent service usingDocumentation Index
Fetch the complete documentation index at: https://qovery-docs-cronjob-required-affinity.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
environment_variable_aliases.
How built-in variable names work
Each service deployed on Qovery gets a set of built-in variables derived from its ID. For applications, the pattern is:a1b2c3d4-xxxx-xxxx-xxxx-xxxxxxxxxxxx, the built-in variable is:
Use
HOST_INTERNAL for service-to-service communication within the same cluster. Use HOST_EXTERNAL only when the consumer must reach the other service from outside the cluster.Linking two services with an alias
In Terraform, you can compute the built-in variable name directly from the resource ID and pass it as an alias to the dependent service:upper(element(split("-", qovery_application.backend.id), 0)) splits the UUID on -, takes the first segment, and uppercases it — matching the name Qovery generates for that service.
Cleaner approach: helper outputs in a module
If you wrapqovery_application in a reusable Terraform module, expose the built-in variable name as an output. This avoids repeating the string manipulation everywhere the module is used.
modules/application/outputs.tf
Related documentation
Application with Database
Connect an application to a managed database
Advanced Patterns
Reusable modules and workspace management
Environment Variables
Built-in variables reference
Provider Reference
Full Terraform provider documentation