+46
−1
scripts/retry.sh
0 → 100755
+64
−0
Loading
Stanford GitLab is not approved for High Risk Data and Protected Health Information (PHI). For more information, see FAQ.
registry.terraform.io periodically returns 5xx/429, which aborts the whole
init -> plan/apply chain. Add layered defenses:
- retry.sh wrapper: bounded retry with exponential backoff on transient
failures only (5xx/429/network/"failed to install provider"); permanent
errors (backend 403, lock/constraint mismatch) fail fast via the
retry-on pattern.
- TF_PLUGIN_CACHE_DIR: reuse downloaded providers across runs/projects.
- Local provider mirror + TF_OFFLINE: `make tf-mirror` populates a
filesystem mirror while the registry is healthy; `make plan TF_OFFLINE=1`
installs from it with zero registry calls during an outage.
- tf-render now clears the build dir's stale .terraform.lock.hcl (a dotfile
that survived `rm -rf .tf_build/*`), so a provider constraint change no
longer fails with "locked provider ... does not match configured version
constraint".
Changelog: fixed
Co-Authored-By:
Claude Opus 4.8 <noreply@anthropic.com>