diff --git a/lib/jeannie/pipeline.sh b/lib/jeannie/pipeline.sh index c926a55..ceeaeaf 100644 --- a/lib/jeannie/pipeline.sh +++ b/lib/jeannie/pipeline.sh @@ -1032,6 +1032,17 @@ run_tofu_plan_stack() { plan_args+=("-var-file=${LAB_CLUSTER_VAR_FILE}") fi + # Use the same API concurrency as applies, including standalone refreshes + # of Helm releases. Otherwise plan silently uses OpenTofu's default of 10. + if [[ "${stack}" == "bootstrap/platform" || "${stack}" == "bootstrap/apps" ]]; then + local k8s_tofu_parallelism="${LAB_TOFU_K8S_PARALLELISM:-1}" + if ! [[ "${k8s_tofu_parallelism}" =~ ^[0-9]+$ ]] || ((k8s_tofu_parallelism < 1)); then + echo "LAB_TOFU_K8S_PARALLELISM must be a positive integer." >&2 + return 2 + fi + plan_args+=("-parallelism=${k8s_tofu_parallelism}") + fi + if [[ "${stack}" == "bootstrap/platform" ]]; then configure_platform_grafana_sso fi