Skip to content

fix(infra): VM reader policy org id; defer compute only on fresh provision#761

Merged
flipvh merged 1 commit into
mainfrom
development
Jun 12, 2026
Merged

fix(infra): VM reader policy org id; defer compute only on fresh provision#761
flipvh merged 1 commit into
mainfrom
development

Conversation

@flipvh

@flipvh flipvh commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Production deploy fixes for the Scaleway credential refactor (SOVRUN §3.3) plus a registry-driven runtime-secrets cleanup.

Changes

  • VM reader IAM policy org idvm-reader-policy now sets organizationId explicitly (from SCW_DEFAULT_ORGANIZATION_ID, else derived from the project) instead of relying on the provider's default org env. The bootstrap "Apply infra change" flow left that env empty, producing organization_id is wrongly formatted on the policy create. helpers.ts exports the resolved org id.
  • applyInProgresscomputeDeferred, fresh-flow only — the compute-gating marker is renamed for clarity and set only during a fresh provision (registry has no images yet). "Apply infra change" no longer defers compute or snapshots/restores the stack file, so running it on an established stack no longer tears down live VMs/LB. The obsolete apply-backup machinery and gitignore entry are removed; infra-cli shows the marker as an informational notice.
  • Permission hintclassifyPermissionError treats IAM policy writes as bootstrap-owned, so the hint points to Apply mode instead of the impossible "Rotate CI".
  • Registry-driven runtime secretsKNOWN_SECRET_KEYS and pulumi-owned secret values are derived from the central runtimeSecrets registry, so a new registry entry needs no hand edits in yaml-secrets.ts or secrets.ts.

Validation

  • pnpm check green (sdk + all typechecks + biome)
  • infra typecheck clean; infra vitest passing

… fresh provision

Production deploy fixes for the Scaleway credential refactor (SOVRUN §3.3):

- vm-reader IAM policy now sets `organizationId` explicitly (resolved from
  SCW_DEFAULT_ORGANIZATION_ID, else derived from the project) instead of relying
  on the provider's default org env, which the "Apply infra change" flow left
  empty and caused `organization_id is wrongly formatted`. helpers.ts exports the
  resolved org id for reuse.

- Rename the `bootstrap:applyInProgress` marker to `bootstrap:computeDeferred` and
  set it ONLY during a fresh provision. "Apply infra change" no longer defers
  compute (or snapshots/restores the stack file), so running it on an established
  stack no longer tears down live VMs/LB. infra-cli surfaces the marker as an
  informational notice; the obsolete apply-backup machinery and gitignore entry
  are removed.

- classifyPermissionError treats IAM `policy` writes as bootstrap-owned so the
  permission hint points to Apply mode rather than the impossible "Rotate CI".

- Runtime secrets are now derived generically from the central registry:
  KNOWN_SECRET_KEYS and pulumi-owned secret values come from runtimeSecrets, so a
  new registry entry needs no hand edits in yaml-secrets.ts or secrets.ts.

Validated: pnpm check green; infra typecheck clean; infra vitest passing.
@flipvh flipvh merged commit cf12cda into main Jun 12, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant