@@ -704,6 +704,7 @@ func (s *server) acquireProtoJob(ctx context.Context, job database.ProvisionerJo
704704 PreviousParameterValues : convertRichParameterValues (lastWorkspaceBuildParameters ),
705705 VariableValues : asVariableValues (templateVariables ),
706706 ExternalAuthProviders : externalAuthProviders ,
707+ TerraformWorkspaceReuse : false , // TODO: Toggle based on experiment
707708 Metadata : & sdkproto.Metadata {
708709 CoderUrl : s .AccessURL .String (),
709710 WorkspaceTransition : transition ,
@@ -781,6 +782,8 @@ func (s *server) acquireProtoJob(ctx context.Context, job database.ProvisionerJo
781782 // There is no owner for a template import, but we can assume
782783 // the "Everyone" group as a placeholder.
783784 WorkspaceOwnerGroups : []string {database .EveryoneGroup },
785+ TemplateId : input .TemplateID .String (),
786+ TemplateVersionId : input .TemplateVersionID .String (),
784787 },
785788 },
786789 }
@@ -3210,6 +3213,10 @@ func auditActionFromTransition(transition database.WorkspaceTransition) database
32103213}
32113214
32123215type TemplateVersionImportJob struct {
3216+ // TemplateID is not guaranteed to be set. Template versions can be created
3217+ // without being associated with a template. Resulting in a template id of
3218+ // `uuid.Nil`
3219+ TemplateID uuid.UUID `json:"template_id"`
32133220 TemplateVersionID uuid.UUID `json:"template_version_id"`
32143221 UserVariableValues []codersdk.VariableValue `json:"user_variable_values"`
32153222}
0 commit comments