RouterOS #65: Terraform objects for the device roots (rb5009-a, rb5009-b, crs309) #1700

Merged
ginjiruu merged 1 commit from routeros-trees-65 into main 2026-11-16 21:04:13 +00:00
Owner

Part of lab/iac#43. Completes lab/iac#65's controller side; activated at the cutover (lab/iac#73).

What lands

clusters/mini/iac/: three Terraform objects + their vars Secrets, shaped exactly like harbor-config.yaml (same GitRepository iac, interval: 1h, approvePlan: "auto", storeReadablePlan: "human", branchPlanner.enablePathScope: true, serviceAccountName: tf-routeros, VAULT_ADDR/VAULT_CACERT + mounted lab-root-ca):

  • routeros-crs309.yaml (+ -vars.yaml)
  • routeros-rb5009-a.yaml (+ -vars.yaml)
  • routeros-rb5009-b.yaml (+ -vars.yaml)

Each root gets its own state (controller default Secret per object, no backendConfig, like harbor). Ordering is a comment, not dependsOn: crs309 first (it is the interlink, lab/iac#44 port map), then the routers, which plan clean against it.

All three ship suspend: true with the reason on the line: applying to hardware before it exists would be wrong; un-suspend at the cutover (lab/iac#73).

Vars: per-device ExternalSecrets via the same vault-backend ClusterSecretStore as harbor-config-vars, keys routeros_password / pppoe_user / pppoe_password from the routeros-secrets KV (RB5009_A_PASSWORD, ..., CRS309_PASSWORD, PPPOE_A_USER, PPPOE_A_PASSWORD, ...). The KV does not exist yet - the bootstrap renderer (#64) seeds the terraform-user password at bench prep, secret handling lives in lab/iac#68. Until seeded, the ExternalSecrets report NotReady; harmless while the objects are suspended, and a useful gate: no un-suspend before the KV exists.

No plaintext secret anywhere; no runner RBAC changes needed (tf-routeros SA + binding already exist in runner-serviceaccounts.yaml).

Verification

  • All six files parse as YAML; spec key-set diffed against harbor-config.yaml: identical except the added suspend.
  • The pre-push task gate ran green (c1 + test trees: "every child builds, every dependsOn resolves, no FAIL rule hit") - run with MC=/home/ginjiruu/Projects/Personal/lab/machine-configs because the worktree has no ../machine-configs sibling.
Part of lab/iac#43. Completes lab/iac#65's controller side; activated at the cutover (lab/iac#73). ## What lands `clusters/mini/iac/`: three Terraform objects + their vars Secrets, shaped exactly like `harbor-config.yaml` (same GitRepository `iac`, `interval: 1h`, `approvePlan: "auto"`, `storeReadablePlan: "human"`, `branchPlanner.enablePathScope: true`, `serviceAccountName: tf-routeros`, VAULT_ADDR/VAULT_CACERT + mounted `lab-root-ca`): - `routeros-crs309.yaml` (+ `-vars.yaml`) - `routeros-rb5009-a.yaml` (+ `-vars.yaml`) - `routeros-rb5009-b.yaml` (+ `-vars.yaml`) Each root gets its own state (controller default Secret per object, no `backendConfig`, like harbor). Ordering is a comment, not `dependsOn`: **crs309 first** (it is the interlink, lab/iac#44 port map), then the routers, which plan clean against it. All three ship `suspend: true` with the reason on the line: applying to hardware before it exists would be wrong; un-suspend at the cutover (lab/iac#73). Vars: per-device ExternalSecrets via the same `vault-backend` ClusterSecretStore as `harbor-config-vars`, keys `routeros_password` / `pppoe_user` / `pppoe_password` from the `routeros-secrets` KV (`RB5009_A_PASSWORD`, `...`, `CRS309_PASSWORD`, `PPPOE_A_USER`, `PPPOE_A_PASSWORD`, ...). The KV does not exist yet - the bootstrap renderer (#64) seeds the terraform-user password at bench prep, secret handling lives in lab/iac#68. Until seeded, the ExternalSecrets report NotReady; harmless while the objects are suspended, and a useful gate: no un-suspend before the KV exists. No plaintext secret anywhere; no runner RBAC changes needed (`tf-routeros` SA + binding already exist in `runner-serviceaccounts.yaml`). ## Verification - All six files parse as YAML; `spec` key-set diffed against `harbor-config.yaml`: identical except the added `suspend`. - The pre-push `task gate` ran green (c1 + test trees: "every child builds, every dependsOn resolves, no FAIL rule hit") - run with `MC=/home/ginjiruu/Projects/Personal/lab/machine-configs` because the worktree has no `../machine-configs` sibling.
Sign in to join this conversation.
No description provided.