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

オープン
#621 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #655 @vibgrate-team による — マージされずにクローズ
  • #705 @noahkhomer18 による — マージされずにクローズ

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
75/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
terraform, typescript
領域
cli, devtools

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
4
フォーク
3
平均マージ
1日 22時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vibgrate/cli のほかの issue

vibgrate/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。