-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
List files uploaded to remote run #27654
Comments
It might help you out in the meantime to use the
|
Ho thanks for that, I never got that from my google search. Maybe it would be nice to add that information in the section that talks about the |
I ran a |
|
It looks like support for As for why I want this feature: I'm running |
Since the files to upload are decided by the upstream library go-slug, which is in turn wrapped by another library go-tfe, Terraform CLI itself is not actually directly involved in deciding what goes into these "slug" archive files that get uploaded. However, since that behavior lives in a library I was able to wrap it in a simple CLI tool here: https://github.com/apparentlymart/go-slug-cli If you build that using a Go toolchain then you can run a command line like I made this quickly in some idle time while I was waiting for a build to complete, in the hope that it would be helpful to the participants in this issue, but it's over in a repository I own to indicate that it's not a real HashiCorp project and so there's no official support for it. I'm going to leave this issue open to represent that there is not yet any official way to list which files would be included if a directory were uploaded to Terraform Cloud by Terraform CLI. I hope this is helpful in the meantime, at least. |
THANK YOU! |
Even if terraform CLI isn't responsible for generating the slug archive, surely there must be a simple way to expose the filenames contained in that slug archive somewhere (either via the CLI or in the TF Cloud UI) before or after it's uploaded? It's just a tar file right? (Even just stashing the file in the |
Current Terraform Version
Use-cases
When using the remote run feature, it is possible to define a custom
.terraformignore
file using glob syntax similar to a.gitignore
. But there seems to be no way to list the files either uploaded or ignored to make sure everything is ok. This can lead to cases where sensitive files are uploaded by accident or the upload time is very long.Attempted Solutions
You can create a copy of you repo, init a new git, use the
.terraformignore
as a.gitignore
and rungit ls-files --ignore --exclude-from=./gitignore
. But it is not practical nor the real pattern matching that happens by terraform.Proposal
I would propose a new command similar to
git ls-files
for terraform to list uploaded or ignored files.References
The text was updated successfully, but these errors were encountered: