From 132b61dda0846ae9018d63cd88638ef679021ff6 Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Tue, 28 Jul 2026 15:51:17 +0530 Subject: [PATCH] fix(terraform): wire-secrets derives ORUN_BACKEND_URL from TF_HTTP_ADDRESS (0.17.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The step runs in the component dir where no intent.yaml or repo link exists — the first live apply (nimbus cloudflare-kv) wired terraform fine but died at 'missing backend URL' pushing the outputs. Co-Authored-By: Claude Fable 5 --- compositions/terraform/jobs/terraform-validate.yaml | 6 ++++-- stack.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/compositions/terraform/jobs/terraform-validate.yaml b/compositions/terraform/jobs/terraform-validate.yaml index c22f943..e5897da 100644 --- a/compositions/terraform/jobs/terraform-validate.yaml +++ b/compositions/terraform/jobs/terraform-validate.yaml @@ -115,8 +115,10 @@ spec: run: | {{- if .parameters.wireSecrets }} set -euo pipefail - # Scope from the runner-exported backend address (org_…/prj_… public - # ids) — no repo link exists in CI, so the CLI reads these env vars. + # Backend + scope from the runner-exported state address (org_…/prj_… + # public ids) — the step may run outside the repo root, so the CLI + # cannot rely on intent.yaml or a repo link for any of the three. + export ORUN_BACKEND_URL=$(printf '%s' "$TF_HTTP_ADDRESS" | sed -E 's#(https?://[^/]+)/.*#\1#') export ORUN_WORKSPACE=$(printf '%s' "$TF_HTTP_ADDRESS" | sed -E 's#.*/organizations/([^/]+)/projects/.*#\1#') export ORUN_PROJECT=$(printf '%s' "$TF_HTTP_ADDRESS" | sed -E 's#.*/projects/([^/]+)/state/.*#\1#') tmp=$(mktemp) diff --git a/stack.yaml b/stack.yaml index 634ccad..0b5d460 100644 --- a/stack.yaml +++ b/stack.yaml @@ -3,7 +3,7 @@ kind: Stack metadata: name: stack-tectonic title: Stack Tectonic - version: 0.17.2 + version: 0.17.3 description: Versioned OCI-hosted catalog of Cloudflare, Terraform and monorepo compositions for Sourceplane repositories. owner: sourceplane tags: