Application redeploy after changes via Terraform

Hi, would it be possible to trigger application redeploy automatically after we make changes via Terraform (e.g. change env variables)? Now after any changes we have to click ‘redeploy’ manually and that kind of contradicts the whole Terraform idea.

1 Like

Hello @km1414,

We have a dedicated resource for that: qovery_deployment

As terraform “executes” resources when a change is done on it, you can use the field version with e.g random_uuid to trigger a redeploy:

// your ressources
// [...]

resource "random_uuid" "test" {
}

resource "qovery_deployment" "my_deployment" {
  environment_id = qovery_environment.env.id
  desired_state = "RUNNING"
  version = random_uuid.test.result

  depends_on = [
    qovery_application.your_app,
  ]
}

This version field is only for terraform, it has no impact / meaning on our API

Ok, will try this out, thank you.

This looks like a very sub-optimal solution… If I understand correctly this will redeploy the whole environment every time. We have big environments and a small change on a single application will trigger a lot of work. Additionally, you could accidentally start any paused applications in the environment.

I think it would be much better if we could configure this on each resource so that after changing that resource we could redeploy it immediately, just like clicking that yellow banner when working via UI.

Yes this is something that we’ll improve, this is planned in our backlog but no ETA yet.

Hello!

Anothers users (mine) perspective: as redeployments usually take some time, I actually highly appreciate to be in control of deployments myself.
From experience with another PaaS provider we previously used, where every change e.g. to envvars automatically triggered deployments, this cost us significant waittime.

To summarize: I understand the potential need, but given the trade-offs involved I‘m happy with the path Qovery has taken so far.

BR adam

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.