Terraform

You can deploy any Terraform manifests/templates with Qovery and manage the lifecycle of your own cloud resources. For example, you can deploy your own databases, lambdas, brokers etc...

Running and deploying your Terraform manifest/template is achieved via the Qovery Lifecycle Jobs, have a look at this section to know how it works.

To simplify the configuration, Qovery provides a Terraform configuration template for your Lifecycle job, allowing you to package your manifest and run it with the Terraform CLI directly on your cluster.

Follow these steps to create and deploy your Terraform manifest/template:

  1. Add a new service

    Enter the environment where you want to deploy your Terraform manifest and select the "Add Service" button

  2. Use the Terraform template

    Select the "Terraform" option in the service creation list and follow the steps.

  3. Manifest location

    Provide the location of your manifest within your git repository

  4. Customize your configuration

    Qovery provides you with a pre-configuration for your lifecycle job capable to run and deploy your Terraform:

    • Dockerfile: you will find a Dockerfile capable to package your manifest/template and run the right Terraform command depending on the event triggered (Example: the "start" command executes "Terraform apply .."). Customize this file to match your needs (backend config, additional configuration etc..)
    • Triggers: you will find the default triggers and commands based on the default Dockerfile.
    • Resources: you will find a default CPU/Memory values capable to run the Terraform CLI on a Kubernetes job
    • Environment variables: you will be able to provide the input of your Terraform manifest/template as file, which will be stored as an environment variable as file. You can also add additional environment variables necessary to run the Terraform commands (like AWS_SECRET_ACCESS_KEY etc..)
  5. Create & Deploy

    Once it is all set, you can Create and Deploy your Terraform job. This will trigger the execution and deployment of the Terraform manifest/template.

  6. Access the Terraform output

    If your Terraform manifest/template generates an output (see Lifecycle job output for more information), the output will be fetched and injected as environment variable to any service of the same environment. It will allow those services to access the newly created resource.

    Job output

Resources

Contents
Resources