Skip to content

Commit 78d7252

Browse files
committed
UserVariableValues
1 parent 72f76b1 commit 78d7252

File tree

5 files changed

+197
-196
lines changed

5 files changed

+197
-196
lines changed

coderd/provisionerdserver/provisionerdserver.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func (server *Server) AcquireJob(ctx context.Context, _ *proto.Empty) (*proto.Ac
257257

258258
protoJob.Type = &proto.AcquiredJob_TemplateImport_{
259259
TemplateImport: &proto.AcquiredJob_TemplateImport{
260-
VariableValues: convertVariableValues(input.VariableValues),
260+
UserVariableValues: convertVariableValues(input.UserVariableValues),
261261
Metadata: &sdkproto.Provision_Metadata{
262262
CoderUrl: server.AccessURL.String(),
263263
},
@@ -402,7 +402,7 @@ func (server *Server) UpdateJob(ctx context.Context, request *proto.UpdateJobReq
402402
server.Logger.Debug(ctx, "insert template variable", slog.F("template_version_id", templateVersion.ID), slog.F("template_variable", templateVariable))
403403

404404
var value = templateVariable.DefaultValue
405-
for _, v := range request.VariableValues {
405+
for _, v := range request.UserVariableValues {
406406
if v.Name == templateVariable.Name {
407407
value = v.Value
408408
break
@@ -1259,8 +1259,8 @@ func auditActionFromTransition(transition database.WorkspaceTransition) database
12591259
}
12601260

12611261
type TemplateVersionImportJob struct {
1262-
TemplateVersionID uuid.UUID `json:"template_version_id"`
1263-
VariableValues []codersdk.VariableValue `json:"variable_values"`
1262+
TemplateVersionID uuid.UUID `json:"template_version_id"`
1263+
UserVariableValues []codersdk.VariableValue `json:"variable_values"`
12641264
}
12651265

12661266
// WorkspaceProvisionJob is the payload for the "workspace_provision" job type.

coderd/templateversions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,8 @@ func (api *API) postTemplateVersionsByOrganization(rw http.ResponseWriter, r *ht
13031303

13041304
templateVersionID := uuid.New()
13051305
jobInput, err := json.Marshal(provisionerdserver.TemplateVersionImportJob{
1306-
TemplateVersionID: templateVersionID,
1307-
VariableValues: req.VariableValues,
1306+
TemplateVersionID: templateVersionID,
1307+
UserVariableValues: req.VariableValues,
13081308
})
13091309
if err != nil {
13101310
return xerrors.Errorf("marshal job input: %w", err)

0 commit comments

Comments
 (0)