You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Declare eden and ragnarok in tofu (ADR-0076's scope), and settle how ragnarok's isolation proof survives it #1443
ADR-0076's scope names "#421's attack VM and targets". Two guests are built outside the pipeline, so tofu can't rebuild either:
eden (BloodHound, VMID 141 on Saruman) is a hand qm clone 901 141 (build-the-bloodhound-guest.md:71);
ragnarok (the attack VM, VMID 130 on gandalf) comes from scripts/make-attack-vm.sh.
Decided
Declare both in tofu (owner's choice on audit finding #18, over superseding ADR-0076).
What has to be settled first: why this is an issue and not yet a PR
A second provider.phoenix.env and gandalf.env export the same names (PROXMOX_URL, PROXMOX_TOKEN_ID, PROXMOX_TOKEN_SECRET), and make-attack-vm.sh refuses to run unless PROXMOX_URL is gandalf's. A provider "proxmox" { alias = "gandalf" } needs its own variables (for example TF_VAR_gandalf_endpoint and a token), with gandalf's CA trusted on phoenix (already true, per build-the-lab-templates.md §5), and an ACL so phoenix@pve on gandalf can create VMID 130.
ragnarok is more than a clone.make-attack-vm.sh also:
sets net1 on vmbr1 with no gateway (172.30.30.10/24);
writes 99-no-forward.conf;
proves §8 check three (forwarding off, no NAT) over SSH, against a host key read through the guest agent (ADR-0085).
tofu can make the VM and its NICs. The no-forward sysctl and the proof are not tofu's job. Either make-attack-vm.sh keeps them as a post-apply --verify-only, or that moves into the module's cloud-init plus a separate proof script. ADR-0017 says the range is "rebuilt, not repaired" by that script, so this probably wants a short ADR that amends 0017 and 0076.
Import, then plan. Import both, and require a plan of No changes before any apply. eden holds the BloodHound graph, and a replace would lose it.
Steps once 1 and 2 are decided
tofu/ gets the gandalf provider, then the eden and ragnarok entries, then import blocks. phoenix runs plan (it must say No changes) and then make-attack-vm.sh --verify-only. Then the runbooks (build-the-bloodhound-guest.md, build-the-playground.md §5) switch to the pipeline.
gandalf is reached through an aliased provider in the same state.provider "proxmox" { alias = "gandalf" } takes its endpoint and token from new TF_VAR_gandalf_endpoint and TF_VAR_gandalf_api_token lines in gandalf.env. phoenix.env is unchanged. The cost, accepted: every plan needs gandalf.env sourced and gandalf reachable.
tofu builds ragnarok, and the script proves it.
The guest module gains a second-NIC option.
cloud-init gives net1 172.30.30.10/24 with no gateway, and writes 99-no-forward.conf.
make-attack-vm.sh becomes a --verify-only proof that runs after every apply: forwarding off and no NAT, checked against a host key read through the guest agent (ADR-0085).
A short ADR amends ADR-0017 ("rebuilt by that script") and ADR-0076.
Order: eden first, in its own PR. It needs neither call, since it is on Saruman behind the existing provider. ragnarok follows, with the gandalf provider and the ADR.
Both halves are up: eden in #1463, and ragnarok, with ADR-0116, in the PR that follows it. Two refinements to the calls recorded above:
The TF_VAR_gandalf_* lines go in phoenix.env, not gandalf.env. That way every existing runbook step that sources phoenix.env before a plan keeps working. In gandalf.env, six runbooks' steps would need both files.
The sysctl file stays in the script (owner's choice).make-attack-vm.sh becomes finish-attack-vm.sh. After every apply it reads the config back, writes 99-no-forward.conf and runs the proof. Putting the file in cloud-init would need tofu to upload a snippet to gandalf over SSH, a second credential path for one file.
Neither guest can reach "No changes" from an import, because tofu can't read back how a hand-built guest was cloned. Both runbooks therefore rebuild: eden is import, plan (one replace), destroy, apply; ragnarok is destroy, then apply. ADR-0081 and ADR-0017 accept the loss for each.
Activity
Gerrrt commentedon Nov 11, 2026
The owner has made the two design calls:
provider "proxmox" { alias = "gandalf" }takes its endpoint and token from newTF_VAR_gandalf_endpointandTF_VAR_gandalf_api_tokenlines ingandalf.env.phoenix.envis unchanged. The cost, accepted: every plan needsgandalf.envsourced and gandalf reachable.net1172.30.30.10/24 with no gateway, and writes99-no-forward.conf.make-attack-vm.shbecomes a--verify-onlyproof that runs after every apply: forwarding off and no NAT, checked against a host key read through the guest agent (ADR-0085).Order: eden first, in its own PR. It needs neither call, since it is on Saruman behind the existing provider. ragnarok follows, with the gandalf provider and the ADR.
Generated by Claude Code
Gerrrt commentedon Nov 12, 2026
Both halves are up: eden in #1463, and ragnarok, with ADR-0116, in the PR that follows it. Two refinements to the calls recorded above:
TF_VAR_gandalf_*lines go inphoenix.env, notgandalf.env. That way every existing runbook step that sourcesphoenix.envbefore a plan keeps working. Ingandalf.env, six runbooks' steps would need both files.make-attack-vm.shbecomesfinish-attack-vm.sh. After every apply it reads the config back, writes99-no-forward.confand runs the proof. Putting the file in cloud-init would need tofu to upload a snippet to gandalf over SSH, a second credential path for one file.Neither guest can reach "No changes" from an import, because tofu can't read back how a hand-built guest was cloned. Both runbooks therefore rebuild: eden is import, plan (one replace), destroy, apply; ragnarok is destroy, then apply. ADR-0081 and ADR-0017 accept the loss for each.
Generated by Claude Code
fix(docs): the domain rebuild targets its six by name, and eden's §1 …
feat(tofu): declare eden, and give the guest module its shape (#1463)