x
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Constants
- type Layout
- func (td Layout) CleanStaleSessions(ctx context.Context, logger slog.Logger, fs afero.Fs, now time.Time) error
- func (td Layout) Cleanup(ctx context.Context, logger slog.Logger, fs afero.Fs)
- func (td Layout) ExtractArchive(ctx context.Context, logger slog.Logger, fs afero.Fs, cfg *proto.Config) error
- func (td Layout) ModulesDirectory() string
- func (td Layout) ModulesFilePath() string
- func (td Layout) PlanFilePath() string
- func (td Layout) ReadmeFilePath() string
- func (td Layout) SelectWorkspace(fs afero.Fs) error
- func (td Layout) StateFilePath() string
- func (td Layout) StateSessionDirectory() string
- func (td Layout) TerraformLockFile() string
- func (td Layout) TerraformMetadataDir() string
- func (td Layout) WorkDirectory() string
- func (td Layout) WorkspaceEnvironmentFilePath() string
Constants¶
const (// ReadmeFile is the location we look for to extract documentation from template versions.ReadmeFile = "README.md")Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeLayout¶
type Layout struct {// contains filtered or unexported fields}funcEphemeralSessionDir¶
EphemeralSessionDir returns the directory name with mandatory prefix. Thesedirectories are created for each provisioning session and are meant to beephemeral.
func (Layout)CleanStaleSessions¶
func (tdLayout) CleanStaleSessions(ctxcontext.Context, loggerslog.Logger, fsafero.Fs, nowtime.Time)error
CleanStaleSessions assumes this Layout is the latest active template version.Assuming that, any other template version directories found alongside it areconsidered inactive and can be removed. Inactive template versions should useephemeral TerraformDirectories.
func (Layout)ExtractArchive¶
func (Layout)ModulesDirectory¶
func (Layout)ModulesFilePath¶
func (Layout)PlanFilePath¶
func (Layout)ReadmeFilePath¶
func (Layout)SelectWorkspace¶
SelectWorkspace writes the terraform workspace environment file, which acts as`terraform workspace select <name>`. It is quicker than using the cli command.More importantly this code can be written without changing the executorbehavior, which is nice encapsulation for this experiment.
func (Layout)StateFilePath¶
func (Layout)StateSessionDirectory¶
StateSessionDirectory follows the same directory structure as Terraformworkspaces. All build specific state is stored within this directory.
These files should be cleaned up on exit. In the case of a failure, they willnot collide with other builds since each build uses a unique session ID.