fix: address Copilot review round 2

- Update header comments: PVETEST_APITOKEN → PVETEST_PASSWORD,
  CACHE_DIR default → /opt/pve-integration
- Pin ubuntu and NFS server Docker images to SHA256 digests
- Fix cmd_all to pass version to provision and cleanup
- Keep .terraform.lock.hcl in force cleanup (provider reproducibility)
- Remove || true from terraform destroy in cleanup (propagate errors;
  use -Force for best-effort recovery)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-25 16:00:16 -05:00
parent 7ffc57e16f
commit 03f6cc86eb
2 changed files with 14 additions and 10 deletions
+6 -2
View File
@@ -25,7 +25,9 @@ resource "docker_container" "answer_server" {
# ── Docker images & volumes ──────────────────────────────────────────
resource "docker_image" "ubuntu" {
name = "ubuntu:24.04"
# Pin to digest for reproducibility. Update:
# docker pull ubuntu:24.04 && docker inspect ubuntu:24.04 --format '{{index .RepoDigests 0}}'
name = "ubuntu@sha256:186072bba1b2f436cbb91ef2567abca677337cfc786c86e107d25b7072feef0c"
}
resource "docker_volume" "iscsi_data" {
@@ -85,7 +87,9 @@ resource "docker_container" "iscsi_target" {
resource "docker_container" "nfs_server" {
name = "pvetest-nfs"
image = "erichough/nfs-server:2.2.1"
# Pin to digest for reproducibility. Update:
# docker pull erichough/nfs-server:2.2.1 && docker inspect erichough/nfs-server:2.2.1 --format '{{index .RepoDigests 0}}'
image = "erichough/nfs-server@sha256:1efd4ece380c5ba27479417585224ef857006daa46ab84560a28c1224bc71e9e"
privileged = true
restart = "unless-stopped"