feat!: extract provisioner tags from coder_workspace_tags data source (#15578)

Relates to https://github.com/coder/coder/issues/15087 and
https://github.com/coder/coder/issues/15427

- Extracts provisioner job tags from `coder_workspace_tags` on template
version creation using `provisioner/terraform/tfparse` added in
https://github.com/coder/coder/pull/15236
- Drops a WARN log in coderd if no matching provisioners found.
- Also drops a warning message in the CLI if no provisioners are found.
- To support both CLI and UI warnings, added a
`codersdk.MatchedProvisioners` struct to the `TemplateVersion` response
containing details of how many provisioners were around at the time of
the insert.

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This commit is contained in:
Cian Johnston
2024-11-25 11:19:14 +00:00
committed by GitHub
co-authored by Mathias Fredriksson
parent 648cdd006c
commit 1cdc3e8921
11 changed files with 694 additions and 95 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ type TemplateVersion struct {
CreatedBy MinimalUser `json:"created_by"`
Archived bool `json:"archived"`
Warnings []TemplateVersionWarning `json:"warnings,omitempty" enums:"DEPRECATED_PARAMETERS"`
Warnings []TemplateVersionWarning `json:"warnings,omitempty" enums:"DEPRECATED_PARAMETERS"`
MatchedProvisioners MatchedProvisioners `json:"matched_provisioners,omitempty"`
}
type TemplateVersionExternalAuth struct {