Hey folks, I’ve been using pants for building/pack...
# general
Hey folks, I’ve been using pants for building/packing projects, and I realised that there’s also an experimental backend for terraform (validation and what not), however I’ve run into a problem where
pants tailor --check update-build-files
is updating my
file with some comment text for the terraform module
Copy code
# NOTE: Sources restricted from the default for terraform_modules due to conflict with...
This was working yesterday, so I’m not sure what’s changed. Has anyone else experienced this?
Hi, welcome! I wonder if this is https://github.com/pantsbuild/pants/issues/14787
I think it is similar, basically I get this when run from a directory where
is, and under this the directory you can see in the command results in
Copy code
./pants tailor services/dev/example-service
16:26:12.43 [WARN] Unmatched glob from services/dev/example-service:tf_mods0's `sources` field: "services/dev/example-service/services/dev/example-service/**/*.tf"

Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to <https://www.pantsbuild.org/v2.10/docs/troubleshooting#pants-cannot-find-a-file-in-your-project>.
16:26:12.43 [WARN] Unmatched glob from services/dev/example-service:tf_mods1's `sources` field: "services/dev/example-service/services/dev/example-service/**/*.tf"

Created services/dev/example-service/BUILD:
  - Add terraform_modules target tf_mods
Then if I run;
Copy code
./pants tailor --check
Would update services/dev/example-service/BUILD:
  - Add terraform_modules target tf_mods0

To fix `tailor` failures, run `./pants tailor`.
And it will just keep going if I
again adding targets for
etc, almost like it’s stuck in some loop
That sounds indeed like a bug. Would you be willing to please add to the issue with this? It will help to make sure that we solve both cases. In the meantime, I recommend disabling tailor for these paths so that you can work around the problem. You can manually add the target instead.
Will do, thank you @hundreds-father-404!
❤️ 1
@fast-nail-55400 what is the current recommendation for how to manually add the target? Should people be using terraform modules with an S or the singular version?an
I haven’t resolved what we want to do there. Namely should we remove
in favor of tailor writing a
target in each directory?
👍 1
there’s probably a bug in the logic that decides to add a