From d12f2ade25daa3ac5df981f84e1e8339088efb02 Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Tue, 28 Jul 2026 14:28:00 +0530 Subject: [PATCH] =?UTF-8?q?feat!:=20de-AWS=20=E2=80=94=20platform=20terraf?= =?UTF-8?q?orm=20state=20backend=20+=20orun-secrets=20wiring=20(0.17.0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every composition drops its AWS surface: - terraform: no aws-credentials step, no S3 -backend-config, no workspaces — state is served by the platform's terraform HTTP backend via runner-exported TF_HTTP_* (orun >= v2.44.0, orun-cloud SB1). New post-apply wire-secrets step pushes declared outputs to orun secrets (wireSecrets: KEY=output list, value over stdin) — the de-AWS wiring channel replacing Secrets Manager writes. - cloudflare-worker-turbo: wire-credentials step gone; wire-live renders from WIRING__ env vars (component secretEnv refs to the keys wire-secrets pushed) instead of Secrets Manager documents. - db-migrate: aws-credentials step gone — the migration runner reads its DB credentials from env (component secretEnv). - cloudflare-domain: same terraform treatment (no role, no S3, no workspaces). Products need: orun >= v2.44.0, backend "http" in terraform roots, and their SM reads/writes converted to orun secretEnv / wireSecrets. Co-Authored-By: Claude Fable 5 --- .../jobs/cloudflare-domain-validate.yaml | 28 +-------- .../profiles/cloudflare-domain-apply.yaml | 2 - .../profiles/cloudflare-domain-plan-only.yaml | 2 - compositions/cloudflare-domain/schema.yaml | 5 -- .../cloudflare-worker-turbo/README.md | 6 +- ...cloudflare-worker-turbo-verify-deploy.yaml | 25 ++++---- .../cloudflare-worker-turbo-deploy.yaml | 1 - .../cloudflare-worker-turbo-verify.yaml | 2 +- .../cloudflare-worker-turbo/schema.yaml | 6 -- compositions/db-migrate/README.md | 7 +-- .../db-migrate/jobs/db-migrate-run.yaml | 11 ---- .../db-migrate/profiles/db-migrate-apply.yaml | 1 - .../db-migrate/profiles/db-migrate-plan.yaml | 1 - compositions/db-migrate/schema.yaml | 5 -- compositions/terraform/README.md | 11 ++-- .../terraform/jobs/terraform-validate.yaml | 60 ++++++++++--------- .../terraform/profiles/terraform-apply.yaml | 3 +- .../terraform/profiles/terraform-local.yaml | 9 +-- .../profiles/terraform-plan-only.yaml | 2 - compositions/terraform/schema.yaml | 10 ++-- stack.yaml | 2 +- 21 files changed, 68 insertions(+), 131 deletions(-) diff --git a/compositions/cloudflare-domain/jobs/cloudflare-domain-validate.yaml b/compositions/cloudflare-domain/jobs/cloudflare-domain-validate.yaml index c8eea84..028f04e 100644 --- a/compositions/cloudflare-domain/jobs/cloudflare-domain-validate.yaml +++ b/compositions/cloudflare-domain/jobs/cloudflare-domain-validate.yaml @@ -13,12 +13,10 @@ spec: capabilities: - cloudflare-domain.setup - - cloudflare-domain.aws-credentials - cloudflare-domain.env - cloudflare-domain.context - cloudflare-domain.fmt - cloudflare-domain.init - - cloudflare-domain.workspace - cloudflare-domain.validate - cloudflare-domain.plan - cloudflare-domain.apply @@ -32,16 +30,6 @@ spec: terraform_version: "{{.parameters.terraformVersion}}" terraform_wrapper: "false" - - id: aws-credentials - name: Configure AWS Credentials - capability: cloudflare-domain.aws-credentials - use: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: "arn:aws:iam::{{.parameters.awsAccountId}}:role/{{.orun.environment.name}}-github-{{.parameters.owner}}-{{.parameters.repo}}-plan" - aws-region: "{{.parameters.awsRegion}}" - audience: sts.amazonaws.com - onFailure: stop - - id: terraform-env name: Export Terraform Env capability: cloudflare-domain.env @@ -89,21 +77,7 @@ spec: terraform -chdir={{ .parameters.terraformDir }} init \ -input=false \ - -reconfigure \ - -backend-config="bucket={{.parameters.orgName}}-{{.orun.environment.name}}" \ - -backend-config="key={{.parameters.repo}}/{{.orun.component.name}}/terraform.tfstate" \ - -backend-config="region=${AWS_REGION:-{{.parameters.awsRegion}}}" - onFailure: stop - - - id: terraform-workspace - name: Workspace - capability: cloudflare-domain.workspace - shell: bash - run: | - set -euo pipefail - - terraform -chdir={{ .parameters.terraformDir }} workspace select -or-create {{ .orun.environment.name }} - echo "TF_WORKSPACE={{ .orun.environment.name }}" >> "$ORUN_ENV" + -reconfigure onFailure: stop - id: terraform-validate diff --git a/compositions/cloudflare-domain/profiles/cloudflare-domain-apply.yaml b/compositions/cloudflare-domain/profiles/cloudflare-domain-apply.yaml index 47a836c..c5ef678 100644 --- a/compositions/cloudflare-domain/profiles/cloudflare-domain-apply.yaml +++ b/compositions/cloudflare-domain/profiles/cloudflare-domain-apply.yaml @@ -9,12 +9,10 @@ spec: cloudflare-domain: includeCapabilities: - cloudflare-domain.setup - - cloudflare-domain.aws-credentials - cloudflare-domain.env - cloudflare-domain.context - cloudflare-domain.fmt - cloudflare-domain.init - - cloudflare-domain.workspace - cloudflare-domain.validate - cloudflare-domain.plan - cloudflare-domain.apply diff --git a/compositions/cloudflare-domain/profiles/cloudflare-domain-plan-only.yaml b/compositions/cloudflare-domain/profiles/cloudflare-domain-plan-only.yaml index 9f89223..a91bc11 100644 --- a/compositions/cloudflare-domain/profiles/cloudflare-domain-plan-only.yaml +++ b/compositions/cloudflare-domain/profiles/cloudflare-domain-plan-only.yaml @@ -9,11 +9,9 @@ spec: cloudflare-domain: includeCapabilities: - cloudflare-domain.setup - - cloudflare-domain.aws-credentials - cloudflare-domain.env - cloudflare-domain.context - cloudflare-domain.fmt - cloudflare-domain.init - - cloudflare-domain.workspace - cloudflare-domain.validate - cloudflare-domain.plan diff --git a/compositions/cloudflare-domain/schema.yaml b/compositions/cloudflare-domain/schema.yaml index d79edd5..1066ac8 100644 --- a/compositions/cloudflare-domain/schema.yaml +++ b/compositions/cloudflare-domain/schema.yaml @@ -34,11 +34,6 @@ spec: type: string terraformVersion: type: string - awsAccountId: - type: string - description: AWS account ID hosting the GitHub-OIDC role this component assumes - awsRegion: - type: string orgName: type: string owner: diff --git a/compositions/cloudflare-worker-turbo/README.md b/compositions/cloudflare-worker-turbo/README.md index 43a7e4a..f7e2b1c 100644 --- a/compositions/cloudflare-worker-turbo/README.md +++ b/compositions/cloudflare-worker-turbo/README.md @@ -27,7 +27,7 @@ be hydrated from an escrow after deploy. - **Optional wiring parameters:** `wranglerTemplate` (empty means a legacy committed config and the wiring steps no-op), `wiringComponents`, `wiringEnvs` (default `stage,prod`), `wiringFixture` (default - `wiring.fixture.json`), `runtimeSecrets`, `awsAccountId`, `awsRegion` (default + `wiring.fixture.json`), `runtimeSecrets` (default `us-east-1`), `orgName`, `owner`, `repo` ## Profiles @@ -38,9 +38,9 @@ Each file in `profiles/` selects steps from the job by capability. | ------------------ | ----- | | `pull-request` | setup-node → setup-pnpm → install → verify-structure → build → typecheck | | `verify` (default) | `pull-request` steps + wire-fixture (offline render) and deploy-dry-run — never needs cloud credentials | -| `deploy` | setup → install → verify-structure → wire-fixture → build → typecheck → wire-credentials → wire-live → pre-deploy → migrate → deploy → secrets-live → smoke; requires approval and a clean git tree | +| `deploy` | setup → install → verify-structure → wire-fixture → build → typecheck → wire-live → pre-deploy → migrate → deploy → secrets-live → smoke; requires approval and a clean git tree | -`wire-credentials` and `wire-live` are deploy-only by design so verify lanes stay +`wire-live` is deploy-only by design so verify lanes stay credential-free; both no-op for components without a `wranglerTemplate`, and `secrets-live` pushes the component's orun-resolved runtime secrets (`runtimeSecrets` names, best-effort via `optionalSecretEnv`) and no-ops for components without them. diff --git a/compositions/cloudflare-worker-turbo/jobs/cloudflare-worker-turbo-verify-deploy.yaml b/compositions/cloudflare-worker-turbo/jobs/cloudflare-worker-turbo-verify-deploy.yaml index f1c8d7b..7d2da28 100644 --- a/compositions/cloudflare-worker-turbo/jobs/cloudflare-worker-turbo-verify-deploy.yaml +++ b/compositions/cloudflare-worker-turbo/jobs/cloudflare-worker-turbo-verify-deploy.yaml @@ -20,7 +20,6 @@ spec: - cloudflare-worker-turbo.build - cloudflare-worker-turbo.typecheck - cloudflare-worker-turbo.deploy-dry-run - - cloudflare-worker-turbo.wire-credentials - cloudflare-worker-turbo.wire-live - cloudflare-worker-turbo.pre-deploy - cloudflare-worker-turbo.migrate @@ -106,16 +105,6 @@ spec: run: "pnpm exec wrangler deploy --dry-run --config {{ .parameters.wranglerConfig }} --env {{ .orun.environment.name }}" onFailure: stop - - id: wire-credentials - name: wire-credentials - capability: cloudflare-worker-turbo.wire-credentials - use: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: "arn:aws:iam::{{.parameters.awsAccountId}}:role/{{.orun.environment.name}}-github-{{.parameters.owner}}-{{.parameters.repo}}-plan" - aws-region: "{{.parameters.awsRegion}}" - audience: sts.amazonaws.com - onFailure: stop - - id: wire-live name: wire-live capability: cloudflare-worker-turbo.wire-live @@ -123,12 +112,20 @@ spec: run: | {{- if .parameters.wranglerTemplate }} set -euo pipefail + # Wiring documents come from orun secrets (de-AWS): each infra component + # pushed its outputs as WIRING_ on the project/ rung + # (terraform wire-secrets step), and THIS component declares them in + # secretEnv as WIRING__ — the runner resolves them into + # the step env, so the render input is plain env-var indirection. wiring_dir=$(mktemp -d) for comp in $(echo "{{ .parameters.wiringComponents }}" | tr ',' ' '); do for wenv in $(echo "{{ .parameters.wiringEnvs }}" | tr ',' ' '); do - aws secretsmanager get-secret-value \ - --secret-id "{{ .parameters.orgName }}/{{ .parameters.repo }}/${comp}/${wenv}" \ - --query SecretString --output text > "${wiring_dir}/${comp}__${wenv}.json" + var="WIRING_$(echo "${comp}" | tr 'a-z-' 'A-Z_')_$(echo "${wenv}" | tr 'a-z' 'A-Z')" + if [ -z "${!var:-}" ]; then + echo "wire-live: ${var} is empty — declare it in this component's secretEnv (secret:////${wenv}/WIRING_$(echo "${comp}" | tr 'a-z-' 'A-Z_'))" >&2 + exit 1 + fi + printf '%s' "${!var}" > "${wiring_dir}/${comp}__${wenv}.json" done done node {{ .parameters.workspaceDir }}/tooling/wire/render.mjs \ diff --git a/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-deploy.yaml b/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-deploy.yaml index 9e5f3e4..31edd55 100644 --- a/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-deploy.yaml +++ b/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-deploy.yaml @@ -37,7 +37,6 @@ spec: - cloudflare-worker-turbo.typecheck # BF6: resolve binding IDs from the Secrets Manager wiring manifest at # deploy time (no-op for workers without a wrangler template). - - cloudflare-worker-turbo.wire-credentials - cloudflare-worker-turbo.wire-live - cloudflare-worker-turbo.pre-deploy - cloudflare-worker-turbo.migrate diff --git a/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-verify.yaml b/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-verify.yaml index 390f9b8..41efd4a 100644 --- a/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-verify.yaml +++ b/compositions/cloudflare-worker-turbo/profiles/cloudflare-worker-turbo-verify.yaml @@ -13,7 +13,7 @@ spec: - cloudflare-worker-turbo.install - cloudflare-worker-turbo.verify-structure # Offline fixture render only — verify lanes must never need cloud - # credentials (BF6 D5 guard); wire-credentials/wire-live are deploy-only. + # credentials (BF6 D5 guard); wire-live is deploy-only. - cloudflare-worker-turbo.wire-fixture - cloudflare-worker-turbo.build - cloudflare-worker-turbo.typecheck diff --git a/compositions/cloudflare-worker-turbo/schema.yaml b/compositions/cloudflare-worker-turbo/schema.yaml index 81b4d26..5f3cc19 100644 --- a/compositions/cloudflare-worker-turbo/schema.yaml +++ b/compositions/cloudflare-worker-turbo/schema.yaml @@ -70,12 +70,6 @@ spec: type: string default: "" description: Comma-separated env var names the secrets-live step pushes as the worker's runtime secrets. Each name resolves from orun secrets via the component's optionalSecretEnv (best-effort — unseeded names are skipped and reported); empty = the step skips. - awsAccountId: - type: string - description: AWS account ID hosting the GitHub-OIDC role wire-live assumes to read wiring secrets - awsRegion: - type: string - default: us-east-1 orgName: type: string owner: diff --git a/compositions/db-migrate/README.md b/compositions/db-migrate/README.md index ccca76b..ccdff50 100644 --- a/compositions/db-migrate/README.md +++ b/compositions/db-migrate/README.md @@ -20,11 +20,8 @@ the run belongs to. - **Job:** `migrate` (default) — `jobs/db-migrate-run.yaml` - **Default profile:** `apply` - **Required parameters:** `nodeVersion`, `pnpmVersion`, `secretName` -- **Optional parameters:** `awsAccountId` (AWS account ID hosting the - GitHub-OIDC role this component assumes), `awsRegion`, `owner`, `repo` +- **Optional parameters:** `owner`, `repo` -`awsAccountId`, `awsRegion`, `owner`, and `repo` are optional in the schema but -are all interpolated into the `aws-credentials` step, so a component that runs either profile in CI needs them set. ## Profiles @@ -33,7 +30,7 @@ Each file in `profiles/` selects steps from the job by capability. | Profile | Steps | | ----------------- | ----- | -| `plan` | setup-node → setup-pnpm → install → build → aws-credentials → plan. Reports pending migrations without mutating the database; used on pull requests. | +| `plan` | setup-node → setup-pnpm → install → build → plan. Reports pending migrations without mutating the database; used on pull requests. | | `apply` (default) | the same setup steps followed by `apply` instead of `plan`. Applies pending migrations to the live database post-merge. | `setup-pnpm` is declared before `setup-node` in the job so `setup-node` can warm diff --git a/compositions/db-migrate/jobs/db-migrate-run.yaml b/compositions/db-migrate/jobs/db-migrate-run.yaml index cb86341..a134496 100644 --- a/compositions/db-migrate/jobs/db-migrate-run.yaml +++ b/compositions/db-migrate/jobs/db-migrate-run.yaml @@ -16,7 +16,6 @@ spec: - db-migrate.setup-pnpm - db-migrate.install - db-migrate.build - - db-migrate.aws-credentials - db-migrate.plan - db-migrate.apply @@ -51,16 +50,6 @@ spec: run: pnpm exec turbo run build --filter=@saas/db onFailure: stop - - id: aws-credentials - name: Configure AWS Credentials - capability: db-migrate.aws-credentials - use: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: "arn:aws:iam::{{.parameters.awsAccountId}}:role/{{.orun.environment.name}}-github-{{.parameters.owner}}-{{.parameters.repo}}-plan" - aws-region: "{{.parameters.awsRegion}}" - audience: sts.amazonaws.com - onFailure: stop - - id: migrate-plan name: Migration Plan capability: db-migrate.plan diff --git a/compositions/db-migrate/profiles/db-migrate-apply.yaml b/compositions/db-migrate/profiles/db-migrate-apply.yaml index 1ef23ac..9e2bc4c 100644 --- a/compositions/db-migrate/profiles/db-migrate-apply.yaml +++ b/compositions/db-migrate/profiles/db-migrate-apply.yaml @@ -12,5 +12,4 @@ spec: - db-migrate.setup-pnpm - db-migrate.install - db-migrate.build - - db-migrate.aws-credentials - db-migrate.apply diff --git a/compositions/db-migrate/profiles/db-migrate-plan.yaml b/compositions/db-migrate/profiles/db-migrate-plan.yaml index dfe83a4..fa3e8dc 100644 --- a/compositions/db-migrate/profiles/db-migrate-plan.yaml +++ b/compositions/db-migrate/profiles/db-migrate-plan.yaml @@ -12,5 +12,4 @@ spec: - db-migrate.setup-pnpm - db-migrate.install - db-migrate.build - - db-migrate.aws-credentials - db-migrate.plan diff --git a/compositions/db-migrate/schema.yaml b/compositions/db-migrate/schema.yaml index 96c4e6c..c222ed1 100644 --- a/compositions/db-migrate/schema.yaml +++ b/compositions/db-migrate/schema.yaml @@ -29,11 +29,6 @@ spec: type: string pnpmVersion: type: string - awsAccountId: - type: string - description: AWS account ID hosting the GitHub-OIDC role this component assumes - awsRegion: - type: string secretName: type: string owner: diff --git a/compositions/terraform/README.md b/compositions/terraform/README.md index 76c39a3..c5b2f3c 100644 --- a/compositions/terraform/README.md +++ b/compositions/terraform/README.md @@ -22,9 +22,8 @@ Repo-local Orun composition for Terraform infrastructure components. | `stackName` | yes | Logical name of the Terraform stack | | `terraformDir` | yes | Relative path to the Terraform root module | | `terraformVersion` | yes | Pinned Terraform CLI version | -| `awsAccountId` | no | AWS account ID hosting the GitHub-OIDC role this component assumes | -| `orgName` | no | Organization name (used for S3 bucket naming) | -| `awsRegion` | no | AWS region override | +| `wireSecrets` | no | Comma-separated `KEY=output` pairs pushed to orun secrets after apply (the de-AWS wiring channel) | +| `orgName` | no | Organization name | | `owner` | no | GitHub org owner | | `repo` | no | GitHub repo name | | `namespace` | no | Logical namespace | @@ -37,8 +36,10 @@ Each file in `profiles/` selects steps from the `terraform` job by capability. ### `plan-only` -Non-mutating validation: setup, AWS credentials, env export, context, fmt, init, -workspace, validate, plan. Used on pull requests to preview changes. +Non-mutating validation: setup, env export, context, fmt, init, validate, plan +(state served by the platform's terraform HTTP backend via runner-exported +TF_HTTP_* — no cloud credentials step, no workspaces). Used on pull requests +to preview changes. ### `apply` (default) diff --git a/compositions/terraform/jobs/terraform-validate.yaml b/compositions/terraform/jobs/terraform-validate.yaml index eea197b..9ddbfc4 100644 --- a/compositions/terraform/jobs/terraform-validate.yaml +++ b/compositions/terraform/jobs/terraform-validate.yaml @@ -13,15 +13,14 @@ spec: capabilities: - terraform.setup - - terraform.aws-credentials - terraform.env - terraform.context - terraform.fmt - terraform.init - - terraform.workspace - terraform.validate - terraform.plan - terraform.apply + - terraform.wire-secrets steps: - id: setup-terraform @@ -32,16 +31,6 @@ spec: terraform_version: "{{.parameters.terraformVersion}}" terraform_wrapper: "false" - - id: aws-credentials - name: Configure AWS Credentials - capability: terraform.aws-credentials - use: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: "arn:aws:iam::{{.parameters.awsAccountId}}:role/{{.orun.environment.name}}-github-{{.parameters.owner}}-{{.parameters.repo}}-plan" - aws-region: "{{.parameters.awsRegion}}" - audience: sts.amazonaws.com - onFailure: stop - - id: terraform-env name: Export Terraform Env capability: terraform.env @@ -82,26 +71,16 @@ spec: name: Init capability: terraform.init shell: bash + # State lives on the platform (SB1): the runner exports TF_HTTP_* per job + # (address = …/state/tfstate/{component}/{env}, run token as password), so + # `backend "http"` needs no -backend-config and no AWS credentials step. + # The environment is IN the address — no terraform workspaces. run: | set -euo pipefail terraform -chdir={{ .parameters.terraformDir }} init \ -input=false \ - -reconfigure \ - -backend-config="bucket={{.parameters.orgName}}-{{.orun.environment.name}}" \ - -backend-config="key={{.parameters.repo}}/{{.orun.component.name}}/terraform.tfstate" \ - -backend-config="region=${AWS_REGION:-{{.parameters.awsRegion}}}" - onFailure: stop - - - id: terraform-workspace - name: Workspace - capability: terraform.workspace - shell: bash - run: | - set -euo pipefail - - terraform -chdir={{ .parameters.terraformDir }} workspace select -or-create {{ .orun.environment.name }} - echo "TF_WORKSPACE={{ .orun.environment.name }}" >> "$ORUN_ENV" + -reconfigure onFailure: stop - id: terraform-validate @@ -121,3 +100,30 @@ spec: capability: terraform.apply run: "terraform -chdir={{ .parameters.terraformDir }} apply -no-color -auto-approve" onFailure: stop + + - id: wire-secrets + name: Wire outputs to orun secrets + capability: terraform.wire-secrets + shell: bash + # Post-apply secret WRITES go through orun (no Secrets Manager): each + # KEY=output pair in wireSecrets pushes `terraform output -raw ` + # into the project/{{env}} secret rung via `orun secrets set` (value over + # stdin — never echoed, never in argv). Downstream consumers read the + # same keys back as secretEnv references. The (org, project) scope is + # parsed from the runner-exported TF_HTTP_ADDRESS, so this step needs no + # extra parameters and works in any workspace the run targets. + run: | + {{- if .parameters.wireSecrets }} + set -euo pipefail + org=$(printf '%s' "$TF_HTTP_ADDRESS" | sed -E 's#.*/organizations/([^/]+)/projects/.*#\1#') + for pair in $(echo "{{ .parameters.wireSecrets }}" | tr ',' ' '); do + key="${pair%%=*}" + output="${pair#*=}" + terraform -chdir={{ .parameters.terraformDir }} output -raw "$output" | \ + orun secrets set "$key" --org "$org" --project --env "{{ .orun.environment.name }}" + echo "wired $key ← output/$output" + done + {{- else }} + echo "wire-secrets: no wireSecrets declared; skipping." + {{- end }} + onFailure: stop diff --git a/compositions/terraform/profiles/terraform-apply.yaml b/compositions/terraform/profiles/terraform-apply.yaml index c31b874..a031d83 100644 --- a/compositions/terraform/profiles/terraform-apply.yaml +++ b/compositions/terraform/profiles/terraform-apply.yaml @@ -9,12 +9,11 @@ spec: terraform: includeCapabilities: - terraform.setup - - terraform.aws-credentials - terraform.env - terraform.context - terraform.fmt - terraform.init - - terraform.workspace - terraform.validate - terraform.plan - terraform.apply + - terraform.wire-secrets diff --git a/compositions/terraform/profiles/terraform-local.yaml b/compositions/terraform/profiles/terraform-local.yaml index 074e4c8..55d64cb 100644 --- a/compositions/terraform/profiles/terraform-local.yaml +++ b/compositions/terraform/profiles/terraform-local.yaml @@ -3,11 +3,9 @@ kind: ExecutionProfile metadata: name: terraform-local spec: - # Credential-free local lane: omits terraform.aws-credentials and - # terraform.apply, so it plans without assuming a role and never mutates - # infrastructure. The description previously read "Full Terraform plan and - # apply for live environments", copy-pasted from the apply profile. - description: Local Terraform plan only — no AWS credentials, no apply + # Local lane: omits terraform.apply (and wire-secrets), so it plans against + # the platform state backend and never mutates infrastructure. + description: Local Terraform plan only — no apply jobs: terraform: @@ -17,6 +15,5 @@ spec: - terraform.context - terraform.fmt - terraform.init - - terraform.workspace - terraform.validate - terraform.plan diff --git a/compositions/terraform/profiles/terraform-plan-only.yaml b/compositions/terraform/profiles/terraform-plan-only.yaml index 87b6492..9a37c13 100644 --- a/compositions/terraform/profiles/terraform-plan-only.yaml +++ b/compositions/terraform/profiles/terraform-plan-only.yaml @@ -9,11 +9,9 @@ spec: terraform: includeCapabilities: - terraform.setup - - terraform.aws-credentials - terraform.env - terraform.context - terraform.fmt - terraform.init - - terraform.workspace - terraform.validate - terraform.plan diff --git a/compositions/terraform/schema.yaml b/compositions/terraform/schema.yaml index c8125cb..652071c 100644 --- a/compositions/terraform/schema.yaml +++ b/compositions/terraform/schema.yaml @@ -25,11 +25,13 @@ spec: - terraformDir - terraformVersion properties: - awsAccountId: - type: string - description: AWS account ID hosting the GitHub-OIDC role this component assumes - awsRegion: + wireSecrets: type: string + description: >- + Comma-separated KEY=output pairs pushed to orun secrets after + apply (project/env rung, value over stdin). The de-AWS wiring + channel: downstream consumers read the same keys as secretEnv + references — no Secrets Manager. lane: type: string namespace: diff --git a/stack.yaml b/stack.yaml index 7b06b40..ad96bd7 100644 --- a/stack.yaml +++ b/stack.yaml @@ -3,7 +3,7 @@ kind: Stack metadata: name: stack-tectonic title: Stack Tectonic - version: 0.16.0 + version: 0.17.0 description: Versioned OCI-hosted catalog of Cloudflare, Terraform and monorepo compositions for Sourceplane repositories. owner: sourceplane tags: