mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: track terraform modules in telemetry (#15450)
Addresses https://github.com/coder/nexus/issues/35. This PR: - Adds a `workspace_modules` table to track modules used by the Terraform provisioner in provisioner jobs. - Adds a `module_path` column to the `workspace_resources` table, allowing to identify which module a resource originates from. - Starts pushing this new information into telemetry. For the person reviewing this PR, do not fret about the 1,500 new lines - ~1,000 of them are auto-generated.
This commit is contained in:
@ -3152,6 +3152,16 @@ type WorkspaceBuildTable struct {
|
||||
MaxDeadline time.Time `db:"max_deadline" json:"max_deadline"`
|
||||
}
|
||||
|
||||
type WorkspaceModule struct {
|
||||
ID uuid.UUID `db:"id" json:"id"`
|
||||
JobID uuid.UUID `db:"job_id" json:"job_id"`
|
||||
Transition WorkspaceTransition `db:"transition" json:"transition"`
|
||||
Source string `db:"source" json:"source"`
|
||||
Version string `db:"version" json:"version"`
|
||||
Key string `db:"key" json:"key"`
|
||||
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
||||
}
|
||||
|
||||
type WorkspaceProxy struct {
|
||||
ID uuid.UUID `db:"id" json:"id"`
|
||||
Name string `db:"name" json:"name"`
|
||||
@ -3186,6 +3196,7 @@ type WorkspaceResource struct {
|
||||
Icon string `db:"icon" json:"icon"`
|
||||
InstanceType sql.NullString `db:"instance_type" json:"instance_type"`
|
||||
DailyCost int32 `db:"daily_cost" json:"daily_cost"`
|
||||
ModulePath sql.NullString `db:"module_path" json:"module_path"`
|
||||
}
|
||||
|
||||
type WorkspaceResourceMetadatum struct {
|
||||
|
Reference in New Issue
Block a user