Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all file endings for Terraform modules #21507

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

frekw
Copy link

@frekw frekw commented Oct 8, 2024

Closes #21506.

It's pretty common to want to include other types of files in a Terraform module (such as json configuration, sql files and such) and use them from Terraform by loading them via file.

Some examples from the repository I'm currently working on are: .json, .sql, .zed (SpiceDB schema), so I think it makes sense to allow for any file extensions here.

Closes pantsbuild#21506.

It's pretty common to want to include other types of files in a
Terraform module (such as json configuration, sql files and such) and
use them from Terraform by loading them via `file`.

Some examples from the repository I'm currently working on are: .json,
.sql, .zed (SpiceDB schema), so I think it makes sense to allow for any
file extensions here.
@huonw huonw requested a review from lilatomic October 24, 2024 22:18
@huonw
Copy link
Contributor

huonw commented Nov 2, 2024

Thanks for waiting for review @frekw!

Have you noticed #21506 (comment) ? That suggests another/better way to handle this would be loading the extra files into Pants via the files target and then configuring the dependencies of terraform_module.

(If this is appropriate to land, we'll need at least one more change: release notes in docs/notes/2.24.x.md. I'd suggest a #### Terraform section with a sentence like The [`terraform_module` target](https://www.pantsbuild.org/2.24/reference/targets/terraform_module) now allows sources with any file extension, not just `.tf`. or similar.)

@benjyw
Copy link
Contributor

benjyw commented Nov 2, 2024

Also, will need to merge latest main and push in order to pick up CI config changes...

@frekw
Copy link
Author

frekw commented Nov 4, 2024

@huonw haven't had time to revisit yet! Will try to get to that, it's not super urgent at the moment. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow all file types in terraform check goal
3 participants