feat: use preview to compute workspace tags from terraform (#18720)

If using dynamic parameters, workspace tags are extracted using
`coder/preview`.
This commit is contained in:
Steven Masley
2025-07-03 14:35:44 -05:00
committed by GitHub
parent 4607e5113b
commit a099a8a25c
14 changed files with 1185 additions and 78 deletions
+19
View File
@@ -0,0 +1,19 @@
package archivefs
import (
"archive/zip"
"io"
"io/fs"
"github.com/spf13/afero"
"github.com/spf13/afero/zipfs"
)
// FromZipReader creates a read-only in-memory FS
func FromZipReader(r io.ReaderAt, size int64) (fs.FS, error) {
zr, err := zip.NewReader(r, size)
if err != nil {
return nil, err
}
return afero.NewIOFS(zipfs.New(zr)), nil
}