Skip to content

Commit e6b4635

Browse files
committed
feat: provisioners to stream over modules >4mb limit
1 parent 348d19d commit e6b4635

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

provisionersdk/proto/provisioner.proto

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,37 @@ message Response {
433433
ParseComplete parse = 2;
434434
PlanComplete plan = 3;
435435
ApplyComplete apply = 4;
436+
DataUpload data_upload = 5;
436437
}
437438
}
438439

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+
439467
service Provisioner {
440468
// Session represents provisioning a single template import or workspace. The daemon always sends Config followed
441469
// by one of the requests (ParseRequest, PlanRequest, ApplyRequest). The provisioner should respond with a stream

0 commit comments

Comments
 (0)