Skip to content

Commit

Permalink
Support all file endings for Terraform modules
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
frekw committed Oct 8, 2024
1 parent b3d249f commit 6c82132
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/python/pants/backend/terraform/target_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class TerraformDependenciesField(Dependencies):

class TerraformModuleSourcesField(MultipleSourcesField):
default = ("*.tf",)
expected_file_extensions = (".tf",)
ban_subdirectories = True
help = generate_multiple_sources_field_help_message(
"Example: `sources=['example.tf', 'new_*.tf', '!old_ignore.tf']`"
Expand Down

0 comments on commit 6c82132

Please sign in to comment.