mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
3194bcfc9e
Provisioner steps broken into smaller granular actions. Changes: - `ExtractArchive` moved to `init` request (was in `configure`) - Writing `tfstate` moved to `plan` (was in `configure`) - Moved most plan/apply outputs to `GraphComplete`
28 lines
771 B
Go
28 lines
771 B
Go
package provisionersdk
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/coder/coder/v2/provisionersdk/proto"
|
|
)
|
|
|
|
func ParseErrorf(format string, args ...any) *proto.ParseComplete {
|
|
return &proto.ParseComplete{Error: fmt.Sprintf(format, args...)}
|
|
}
|
|
|
|
func InitErrorf(format string, args ...any) *proto.InitComplete {
|
|
return &proto.InitComplete{Error: fmt.Sprintf(format, args...)}
|
|
}
|
|
|
|
func PlanErrorf(format string, args ...any) *proto.PlanComplete {
|
|
return &proto.PlanComplete{Error: fmt.Sprintf(format, args...)}
|
|
}
|
|
|
|
func ApplyErrorf(format string, args ...any) *proto.ApplyComplete {
|
|
return &proto.ApplyComplete{Error: fmt.Sprintf(format, args...)}
|
|
}
|
|
|
|
func GraphError(format string, args ...any) *proto.GraphComplete {
|
|
return &proto.GraphComplete{Error: fmt.Sprintf(format, args...)}
|
|
}
|