@@ -433,9 +433,37 @@ message Response {
433
433
ParseComplete parse = 2 ;
434
434
PlanComplete plan = 3 ;
435
435
ApplyComplete apply = 4 ;
436
+ DataUpload data_upload = 5 ;
436
437
}
437
438
}
438
439
440
+ enum DataUploadType {
441
+ UPLOAD_TYPE_UNKNOWN = 0 ;
442
+ // UPLOAD_TYPE_MODULE_FILES is used to stream over terraform module files.
443
+ // These files are located in `.terraform/modules` and are used for dynamic
444
+ // parameters.
445
+ UPLOAD_TYPE_MODULE_FILES = 1 ;
446
+ }
447
+
448
+ message DataUpload {
449
+ DataUploadType upload_type = 1 ;
450
+ // data_hash is the sha256 of the payload to be uploaded.
451
+ // This is also used to uniquely identify the upload.
452
+ string data_hash = 2 ;
453
+ // file_size is the total size of the data being uploaded.
454
+ int64 file_size = 3 ;
455
+ // Number of chunks to be uploaded.
456
+ int32 chunks = 4 ;
457
+ }
458
+
459
+ // ChunkPiece is used to stream over large files (over the 4mb limit).
460
+ message ChunkPiece {
461
+ bytes data = 1 ;
462
+ string upload_type = 2 ;
463
+ string data_hash = 3 ;
464
+ int32 piece_index = 4 ;
465
+ }
466
+
439
467
service Provisioner {
440
468
// Session represents provisioning a single template import or workspace. The daemon always sends Config followed
441
469
// by one of the requests (ParseRequest, PlanRequest, ApplyRequest). The provisioner should respond with a stream