-
Notifications
You must be signed in to change notification settings - Fork 27
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
Feature Request: Ignore paths when creating hosted artifact #83
Comments
Hmm, this seems to be basically a duplicate of #41 [Edit] On further inspection, it is not the same. That request was to use a sort of base path to create the archive from. |
Created gitlab issue: https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/561 |
Interesting! I like this idea. |
Fortunately, I've found a parser that supports these kinds of formats (because, whilst it would be interesting to write, it's something that would likely have so many teething issues and unforeseen use-cases). Some I was thinking:
|
Oh, I see you already suggested .tfmodigore and .tfignore.. so let's go with .tfignore :) |
I have many modules which are relatively small in terms of raw
terraform
code, but have documentation and tests included which are often multiple times the content.It would be great if
terrareg
had something like the.gitignore
file (possibly.tfmodignore
or just.tfignore
) which would exclude some portion of the module's contents from the generated artifacts when hosting them rather than using a git url.For example, consider the following simplified illustration:
The only portion that must be served to terraform are these:
> tree -a my-module my-module ├── data.tf ├── main.tf ├── modules │ └── sub │ └── main.tf ├── _module_version_.tf ├── outputs.tf ├── variables.tf └── versions.tf
So, if I could create a
.tfignore
file which follows the same rules as.gitignore
, then I could include this to achieve the desired results:my-module/.tfignore:
And I guess it would make sense for it to automatically ignore itself, but I wouldn't object to having to make that explicit.
The text was updated successfully, but these errors were encountered: