feat: Add basic support for rich parameters to coderd and provisionerd (#5710)

This commit is contained in:
Marcin Tojek
2023-01-17 11:22:11 +01:00
committed by GitHub
parent 70fd78673d
commit 6ebadabe4e
39 changed files with 2592 additions and 800 deletions
+692 -343
View File
File diff suppressed because it is too large Load Diff
+31 -1
View File
@@ -52,6 +52,34 @@ message ParameterSchema {
string validation_condition = 11;
}
// RichParameterOption represents a singular option that a parameter may expose.
message RichParameterOption {
string name = 1;
string description = 2;
string value = 3;
string icon = 4;
}
// RichParameter represents a variable that is exposed.
message RichParameter {
string name = 1;
string description = 2;
string type = 3;
bool mutable = 4;
string default_value = 5;
string icon = 6;
repeated RichParameterOption options = 7;
string validation_regex = 8;
int32 validation_min = 9;
int32 validation_max = 10;
}
// RichParameterValue holds the key/value mapping of a parameter.
message RichParameterValue {
string name = 1;
string value = 2;
}
// LogLevel represents severity of the log.
enum LogLevel {
TRACE = 0;
@@ -183,6 +211,7 @@ message Provision {
message Plan {
Config config = 1;
repeated ParameterValue parameter_values = 2;
repeated RichParameterValue rich_parameter_values = 3;
}
message Apply {
@@ -201,8 +230,9 @@ message Provision {
message Complete {
bytes state = 1;
string error = 2;
bytes plan = 4;
repeated Resource resources = 3;
repeated RichParameter parameters = 4;
bytes plan = 5;
}
message Response {
oneof type {