Enhancement: read resolved Terraform module versions from `.terraform/modules/modules.json`

Aperta
#621 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #655 di @vibgrate-team — chiusa senza merge
  • #705 di @noahkhomer18 — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
75/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
terraform, typescript
Ambito
cli, devtools

Direzione di ricerca

Start with src/core-open/scanners/terraform-scanner.ts and the existing .terraform.lock.hcl handling; check the Terraform scanner fixtures and tests for how resolved versions are asserted. Add coverage for a modules.json entry with version 5.8.1, the missing or unreadable file fallback, and update the lock-file note in DOCS.md. Done when the fixture reports resolvedVersion 5.8.1 and output without the file stays unchanged.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Context

For providers, src/core-open/scanners/terraform-scanner.ts reads .terraform.lock.hcl and reports the exact resolvedVersion. Modules have no lock file, so a constraint like version = "~> 5.0" is reported with resolvedVersion: null and drift is computed from the lowest version the range allows. After terraform init (or tofu init), the version actually installed for each module is recorded in .terraform/modules/modules.json (Modules[].Source / Version).

What to do

  • When .terraform/modules/modules.json exists next to the configuration, use its Version for matching registry module sources as resolvedVersion.
  • Fall back to today's behaviour when the file is missing or unreadable.
  • Document the behaviour in DOCS.md next to the existing lock-file note.

Acceptance

  • A fixture with version = "~> 5.0" and a modules.json entry at 5.8.1 reports resolvedVersion 5.8.1.
  • Without modules.json, output is unchanged.
  • DOCS.md mentions the file.
Lingua principale
TypeScript
Stelle
4
Fork
3
Merge medio
1g 22h
PR unite (30g)
76

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vibgrate/cli

Tutte le issue di vibgrate/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.