environment_variable_aliases.
To connect an application to a database, see Application with Database.
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:
QOVERY_CONTAINER_ and QOVERY_HELM_. HOST_EXTERNAL exists only for a service with a publicly accessible port.
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 from the resource ID and pass it as an alias to the dependent service. This configuration creates an environment in an existing project, deploys a backend and a frontend in it, and gives the frontend the internal host name of the backend asBACKEND_HOST_INTERNAL:
main.tf
upper(split("-", qovery_application.backend.id)[0]) splits the UUID on -, takes the first segment, and uppercases it, which matches the name Qovery generates for that service. The frontend then calls the backend at http://$BACKEND_HOST_INTERNAL:8080.
Referencing qovery_application.backend.id also makes Terraform create the backend first, so the built-in variable exists when Terraform creates the alias.
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. The module takes the aliases of the service as an input.
modules/application/main.tf
required_providers block. Otherwise Terraform looks for a hashicorp/qovery provider.
This keeps the string manipulation in one place and makes service dependencies explicit and readable across your whole Terraform codebase.
Related documentation
Application with Database
Connect an application to a database
Advanced Patterns
Reusable modules and workspace management
Environment Variables
Built-in variables and aliases
Provider Reference
Full Terraform provider documentation