pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.19k stars 613 forks source link

Add targets for terraform lockfiles #21099

Open lilatomic opened 1 week ago

lilatomic commented 1 week ago

Terraform lockfiles were magically pulled in with a pathglob. This meant that --changed-since had no visibility on changes in the lockfile. This MR adds a synthetic target for terraform lockfiles, wires it into dep inference, and uses its Sources to pull it in.

The key reason to use a synthetic target instead of a normal target with tailor is that the lockfile must be called .terraform.lock.hcl and must be in the same directory as the root module of a Terraform deployment. So any such file must be a Terraform lockfile, and no other file can be.

closes #14790