Skip to main content
This example creates a project, an environment and an application built from the Dockerfile of a public git repository, then deploys the environment on an existing cluster.

Prerequisites

  • The provider set up as described in the overview, with the QOVERY_API_TOKEN environment variable set.
  • The ID of your organization and the ID of an existing cluster. See Find resource IDs.

Configuration

variables.tf
main.tf
About this configuration:
  • healthchecks is required. Set the probe ports and path to what your application serves. An HTTP probe requires scheme.
  • auto_deploy is true by default: Qovery redeploys the application on each new commit to main.
  • Changing the application in the configuration updates it in Qovery but does not redeploy it. To redeploy on the next terraform apply, set version on qovery_deployment to a new UUID, or deploy from the Console.

Deploy

terraform apply waits for the deployment to finish, then prints the application URL.

Clean up

This deletes the application, the environment and the project.

Next steps

Application with Database

Connect the application to a database

Multi-Environment Setup

Deploy the same stack to several environments

qovery_application reference

Every attribute of the application resource

qovery_deployment reference

Deploy, stop or restart an environment