Hi, when running terraform to create qovery environments im getting an error but it still creates an environment / lifecycle job.
resource "qovery_job" "terraform" {
environment_id = qovery_environment.this.id
name = "openc-consumption - Terraform"
cpu = 500
memory = 512
max_nb_restart = 0
max_duration_seconds = 1800
auto_preview = false
auto_deploy = false
source = {
docker = {
git_repository = {
url = "https://github.com/openc/openc-consumption.git"
branch = "DEV-1610-iac"
root_path = "/infra"
git_token_id = "9e7fc347-835e-4860-8ce5-93a6db5fdd65"
}
dockerfile_path = "Dockerfile"
}
}
schedule = {
on_start = {
arguments = ["-c", "terraform apply -no-color -auto-approve && terraform output -json > /qovery-output/qovery-output.json"],
entrypoint = ""
}
on_delete = {
arguments = ["-c", "terraform destroy -no-color -auto-approve"],
entrypoint = ""
}
}
deployment_stage_id = qovery_deployment_stage.terraform.id
healthchecks = {}
# deployment_restrictions = [
# ]
# advanced_settings_json = jsonencode(
# {
# "build.timeout_max_sec" : 1800,
# "build.cpu_max_in_milli" : 4000,
# "build.ram_max_in_gib" : 8,
# "deployment.affinity.node.required" : { },
# "deployment.termination_grace_period_seconds" : 60,
# "job.delete_ttl_seconds_after_finished" : null,
# "cronjob.concurrency_policy" : "Forbid",
# "cronjob.failed_jobs_history_limit" : 1,
# "cronjob.success_jobs_history_limit" : 1,
# "security.service_account_name" : "",
# "security.read_only_root_filesystem" : false,
# "security.automount_service_account_token" : false
# }
# )
}
Generates error:
Error: Error on job create
β
β with qovery_job.terraform,
β on lifecycle-job.tf line 1, in resource "qovery_job" "terraform":
β 1: resource "qovery_job" "terraform" {
β
β failed to create job: Could not create job 'openc-consumption - Terraform', unexpected error: data failed to match schemas in oneOf(JobResponse)
But you can still see a new env and lifecycle job created in the UI