Skip to content

Commit b7321d6

Browse files
committed
add comment
1 parent c61fca4 commit b7321d6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

provisionersdk/tfpath/tfpath.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,17 @@ const (
2626
sessionDirPrefix = "Session"
2727
)
2828

29-
func Session(parent, sessionID string) Layout {
30-
return Layout(filepath.Join(parent, sessionDirPrefix+sessionID))
29+
// Session creates a directory structure layout for terraform execution. The
30+
// SessionID is a unique value for creating an ephemeral working directory inside
31+
// the parentDirPath. All helper functions will return paths for various
32+
// terraform asserts inside this working directory.
33+
func Session(parentDirPath, sessionID string) Layout {
34+
return Layout(filepath.Join(parentDirPath, sessionDirPrefix+sessionID))
3135
}
3236

37+
// Layout is the terraform execution working directory structure.
38+
// It also contains some methods for common file operations within that layout.
39+
// Such as "Cleanup" and "ExtractArchive".
3340
// TODO: Maybe we should include the afero.FS here as well, then all operations
3441
// would be on the same FS?
3542
type Layout string

0 commit comments

Comments
 (0)