Documentation ¶
Overview ¶
Package tvm stands for Terraform version manager. It will automatically download and manage multiple Terraform binaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InspectVersion ¶
InspectVersion will find out what version the Terraform binary at the given location is.
Types ¶
type VersionRepo ¶
type VersionRepo struct {
// contains filtered or unexported fields
}
VersionRepo is a directory on the filesystem that keeps Terraform binaries.
func NewVersionRepo ¶
func NewVersionRepo(repoPath string, arch string, platform string) (*VersionRepo, error)
NewVersionRepo creates a new VersionRepo. The arch will be appended to the provided path for all downloaded binaries.
func NewVersionRepoForCurrentSystem ¶
func NewVersionRepoForCurrentSystem(repoPath string) (*VersionRepo, error)
NewVersionRepoForCurrentSystem returns a new VersionRepo instance with platform and architecture information retrieve from the current system.
func (*VersionRepo) Get ¶
func (r *VersionRepo) Get(version string) (string, error)
Get takes a version and returns the path to the Terraform binary for that version. If the binary doesn't exist, it will be downloaded from the Terraform website automatically.