terraform/website/source/intro/getting-started/install.html.markdown

65 lines
2.6 KiB
Markdown
Raw Normal View History

2014-07-16 23:51:48 +02:00
---
layout: "intro"
page_title: "Installing Terraform"
sidebar_current: "gettingstarted-install"
2014-10-22 05:21:56 +02:00
description: |-
2017-04-06 20:02:56 +02:00
Terraform must first be installed on your machine. Terraform is distributed as
a binary package for all supported platforms and architecture. This page will
not cover how to compile Terraform from source.
2014-07-16 23:51:48 +02:00
---
# Install Terraform
2017-04-06 20:02:56 +02:00
Terraform must first be installed on your machine. Terraform is distributed as a
[binary package](/downloads.html) for all supported platforms and architectures.
This page will not cover how to compile Terraform from source, but compiling
from source is covered in the [documentation](/docs/index.html) for those who
want to be sure they're compiling source they trust into the final binary.
2014-07-16 23:51:48 +02:00
## Installing Terraform
2017-04-06 20:02:56 +02:00
To install Terraform, find the [appropriate package](/downloads.html) for your
system and download it. Terraform is packaged as a zip archive.
2014-07-23 23:06:47 +02:00
2017-04-06 20:02:56 +02:00
After downloading Terraform, unzip the package. Terraform runs as a single
binary named `terraform`. Any other files in the package can be safely removed
and Terraform will still function.
The final step is to make sure that the `terraform` binary is available on the `PATH`.
See [this page](https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux)
2014-07-23 23:06:47 +02:00
for instructions on setting the PATH on Linux and Mac.
2016-01-14 21:55:39 +01:00
[This page](https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows)
2014-07-23 23:06:47 +02:00
contains instructions for setting the PATH on Windows.
2014-07-16 23:51:48 +02:00
## Verifying the Installation
After installing Terraform, verify the installation worked by opening a new
terminal session and checking that `terraform` is available. By executing
2017-04-06 20:02:56 +02:00
`terraform` you should see help output similar to this:
2014-07-16 23:51:48 +02:00
2017-04-06 20:02:56 +02:00
```text
2014-07-16 23:51:48 +02:00
$ terraform
2016-11-24 16:54:38 +01:00
Usage: terraform [--version] [--help] <command> [args]
The available commands for execution are listed below.
The most common, useful commands are shown first, followed by
less common or more advanced commands. If you're just getting
started with Terraform, stick with the common commands. For the
other commands, please read the help and docs before usage.
Common commands:
apply Builds or changes infrastructure
2017-02-13 20:15:40 +01:00
console Interactive console for Terraform interpolations
2017-04-06 20:02:56 +02:00
# ...
2014-07-16 23:51:48 +02:00
```
2017-04-06 20:02:56 +02:00
If you get an error that `terraform` could not be found, your `PATH` environment
variable was not set up properly. Please go back and ensure that your `PATH`
variable contains the directory where Terraform was installed.
2017-04-06 20:02:56 +02:00
## Next Steps
2017-04-06 20:02:56 +02:00
Time to [build infrastructure](/intro/getting-started/build.html) using a
minimal Terraform configuration file. You will be able to examine Terraform's
execution plan before you deploy it to AWS.