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
[ENH] Allow to retry 2nd build_lab phase in case VPN connection was not configured or ansible failed. #1368
I was able to finishing building 1 phase, then without configured wireguard i started building lab (2nd phase). Naturally, ansible was not able to connect to instances and failed in that case web app was showing it's in progress (hang) and it only allows to Abort. Once aborted the only option is to Destroy env, it would be handy if I could retry 2nd phase from UI.
Rather than destroying everything and rebuilding from scratch, a more resilient approach would be to track build phase state and allow targeted re-runs:
2. Use Terraform's -target flag for partial re-runs:
When resuming, only target the failed phase's resources instead of running terraform apply on everything:
3. Separate phase tracking from resource destruction — keep the state file alongside terraform.tfstate so that attack_range destroy only removes resources for a specific phase if --phase is passed, rather than nuking the entire environment.
This way, a user who hits a failure in phase 2 can resume from phase 2 without re-running (and potentially re-paying for) phase 1 resources.
Activity
P4T12ICK commentedon Feb 13, 2026
Great point. I will work on it.
janderik commentedon Jul 22, 2026
Rather than destroying everything and rebuilding from scratch, a more resilient approach would be to track build phase state and allow targeted re-runs:
1. Track phase state with a simple state machine:
2. Use Terraform's
-targetflag for partial re-runs:When resuming, only target the failed phase's resources instead of running
terraform applyon everything:3. Separate phase tracking from resource destruction — keep the state file alongside
terraform.tfstateso thatattack_range destroyonly removes resources for a specific phase if--phaseis passed, rather than nuking the entire environment.This way, a user who hits a failure in phase 2 can resume from phase 2 without re-running (and potentially re-paying for) phase 1 resources.