Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d39a53c

Browse files
committed
error if big
1 parent d8768e1 commit d39a53c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

provisioner/terraform/modules.go

+4
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,9 @@ func getModulesArchive(workdir string) ([]byte, error) {
153153
if empty {
154154
return []byte{}, nil
155155
}
156+
157+
if b.Len() > (10 << 20) {
158+
return nil, xerrors.New("modules archive exceeds 10MB, modules will not be persisted")
159+
}
156160
return b.Bytes(), nil
157161
}

0 commit comments

Comments
 (0)