chore: append template metadata to protobuf config (#20558)

Adds some extra meta data sent to provisioners. Also adds a field
`reuse_terraform_workspace` to tell the provisioner whether or not to
use the caching experiment.
This commit is contained in:
Steven Masley
2025-11-12 12:46:39 -06:00
committed by GitHub
parent 5e85663ce3
commit 9149c1e9f2
13 changed files with 665 additions and 523 deletions
+9
View File
@@ -10,6 +10,15 @@ import (
"github.com/microcosm-cc/bluemonday"
)
// EmptyToNil returns a `nil` for an empty string, or a pointer to the string
// otherwise. Useful when needing to treat zero values as nil in APIs.
func EmptyToNil(s string) *string {
if s == "" {
return nil
}
return &s
}
// JoinWithConjunction joins a slice of strings with commas except for the last
// two which are joined with "and".
func JoinWithConjunction(s []string) string {