Qovery Terraform Provider
Bot releases are visible (Hide)
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by erebe over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
The purpose of this change is to allow the deployment of services through deployment stages.
Before this change, every service (application / database / container) was deployed sequentially using a state
attribute inside the terraform file, e.g:
resource "qovery_application" "app" {
#[...]
state = "RUNNING"
}
The following points must require your attention:
qovery_deployment_stage
resourceqovery_deployment
resourcestate
present in each service resources has been removedThis resource is not mandatory. If no deployment stage is created, services will be deployed using default natural stages: databases -> jobs -> containers -> applications
Deployment stage resource allows to set its order through move_after
and move_before
attributes (optional)
resource "qovery_deployment_stage" "stage_1" {
environment_id = qovery_environment.environment.id
name = "Deployment Stage 1"
description = "some deployment stage"
}
resource "qovery_deployment_stage" "stage_2" {
environment_id = qovery_environment.environment.id
name = "Deployment Stage 2"
description = "some deployment stage"
move_after = qovery_deployment_stage.stage_1.id
}
A deployment stage can then be linked to a service, e.g:
resource "qovery_application" "app" {
#[...]
deployment_stage_id = qovery_deployment_stage.stage_1.id
}
Services are now deployed using the deployment_resource
desired_state
is similar to the state
attribute we used in service resources, it can be one of the following values: RUNNING
, STOPPED
, RESTARTED
version
is used to force terraform to retrigger a deployment even if the desired_state
hasn't changed.desired_state
equal to RUNNING
version
in your qovery_deployment
resourceℹ️ version
is a UUID, you can use external lib such as hashicorp/random to generate random values
terraform {
required_providers {
random = {
source = "hashicorp/random"
version = "3.4.3"
}
}
}
#[...]
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.app, qovery_container.container, qovery_database.database]
}
the state
attribute is now removed so it must not be present on the services resources.
It concerns the following resources: qovery_application
, qovery_container
and qovery_database
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by erebe over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
/redeploy
instead of /restart
endpoint https://github.com/Qovery/terraform-provider-qovery/pull/154