Skip to content

"Archive too big" when uploading workspace template due to .terraform folders being included #3938

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

Closed
kconley-sq opened this issue Sep 7, 2022 · 0 comments · Fixed by #3997

Comments

@kconley-sq
Copy link
Contributor

kconley-sq commented Sep 7, 2022

Trying to upload a new version of a Coder workspace template using coder templates push -d /path/to/template/folder/ template-name (using version v0.8.4 of the Coder CLI tool) fails with the error:

Archive too big. Must be <= 1048576 bytes

The .tf files in our workspace template folder aren't very large, though:

# `.` here is our workspace template directory
❯ find . f -name '*.tf' -exec du -ch {} + | grep total$
 88K    total

I think the issue may be that the .terraform folders that are generated when we run terraform init (towards being able to run terraform validate) are being considered by the Coder CLI tool when constructing the template archive:

# `.` here is our workspace template directory
❯ du -h .
...
347M    .terraform
302M    a_local_module/.terraform

I saw that hidden files are skipped by the Coder CLI tool when it creates the template archive - could hidden folders (or at least .terraform) be skipped as well?

if strings.HasPrefix(rel, ".") {
// Don't archive hidden files!
return err
}

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 a pull request may close this issue.

2 participants