Files
nomad/enos/modules/run_workloads/outputs.tf
Juana De La Cuesta 2dadf9fe6c Improve stability (#25244)
* func: add dependencies to avoid race conditions and move the update to each client to the main upgrade scenario

* Update enos/enos-scenario-upgrade.hcl

Co-authored-by: Tim Gross <tgross@hashicorp.com>

* Update enos/enos-scenario-upgrade.hcl

Co-authored-by: Tim Gross <tgross@hashicorp.com>

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2025-03-04 16:23:07 +01:00

33 lines
1.2 KiB
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
output "jobs_count" {
description = "The number of jobs thar should be running in the cluster"
value = length(var.workloads) + tonumber(coalesce(chomp(enos_local_exec.get_jobs.stdout)))
}
output "new_jobs_count" {
description = "The number of jobs that were triggered by the module"
value = length(var.workloads)
}
output "allocs_count" {
description = "The number of allocs that should be running in the cluster"
value = local.system_job_count * tonumber(coalesce(chomp(enos_local_exec.get_nodes.stdout))) + local.service_batch_allocs + tonumber(coalesce(chomp(enos_local_exec.get_allocs.stdout)))
}
output "nodes" {
description = "Number of current clients in the cluster"
value = chomp(enos_local_exec.get_nodes.stdout)
}
output "new_allocs_count" {
description = "The number of allocs that will be added to the cluster after all the workloads are run"
value = local.system_job_count * tonumber(coalesce(chomp(enos_local_exec.get_nodes.stdout), "0")) + local.service_batch_allocs
}
output "system_job_count" {
description = "The number of jobs that were triggered by the module"
value = local.system_job_count
}