Downloads specific versions of Terraform
.
Currently limited to Windows (x86, x86_64), MacOS, Linux (x86, x86_64), Solaris (x86_64) and FreeBSD (x86, x86_64).
There are more binary packages are available from the Terraform site, but currently these are not being tested not implemented. This includes:
(Patches welcome!)
Modifiers | Name | Description |
---|---|---|
static Arch |
ARCH |
|
static java.lang.String |
BASEURI |
|
static OperatingSystem |
OS |
|
static java.lang.String |
TOOL_IDENTIFIER |
Constructor and description |
---|
Downloader
(java.lang.String version, ProjectOperations projectOperations) Creates a downloader |
Type Params | Return Type | Name and description |
---|---|---|
|
protected java.io.File |
getAndVerifyDistributionRoot(java.io.File distDir, java.lang.String distributionDescription) Validates that the unpacked distribution is good. |
|
java.io.File |
getTerraformExecutablePath() Returns the path to the terraform executable.
|
|
static boolean |
isDownloadSupported() Tells the system whether downloading can be supported. |
|
java.net.URI |
uriFromVersion(java.lang.String ver) Provides an appropriate URI to download a specific version of Terraform. |
Creates a downloader
version
- Version of Terraform
.projectOperations
- Project this is associated with.Validates that the unpacked distribution is good.
distDir
- Directory where distribution was unpacked to.distributionDescription
- A descriptive name of the distributiondistDir
as Packer
distributions contains only a single executable. Returns the path to the terraform
executable.
Will force a download if not already downloaded.
terraform
or null if not a supported operating system.Tells the system whether downloading can be supported.
Provides an appropriate URI to download a specific version of Terraform.
ver
- Version of Terraform to downloadnull
otherwise.