Step-by-step tutorial of how to download and install Terraform on Windows, Linux and Mac OS.

Terraform is distributed as a binary package for all supported platforms and architectures and must first be installed on your machine.

Check out the releases CHANGELOG for more information on the latest release and choose the version that is required for your Operating System and your project. If you just getting started with Terraform , I suggest you to get the latest release.

Download Terraform

You can  download a version of Terraform from the releases service.

Install Terraform – Windows

  1. Download terraform for windows

    • Note: Terraform is packaged as a zip archive, so 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
  2. Copy files from the zip to “c:\terraform” for example. That’s our terraform PATH.
  3. The final step is to make sure that the terraform binary is available on the PATH.

General Information

  • The PATH is the system variable that your operating system uses to locate needed executables from the command line or Terminal window.
  • The PATH system variable can be set using System Utility in control panel on Windows, or in your shell’s startup file on Linux.

Windows 10 and Windows 8

  1. In Search, search for and then select: System (Control Panel)
  2. Click the System and Security link.
  3. Click the System link.
  4. Click the Advanced system settings link.
  5. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
  6. In the Edit System Variable (or New System Variable) window, append at the end of the PATH environment variable the value of terraform path ex.”c:\terraform;” . Click OK. Close all remaining windows by clicking OK.
  7. Reopen Command prompt window, and run terraform.

Windows 7

  1. From the desktop, right click the Computer icon.
  2. Choose Properties from the context menu.
  3. Click the Advanced system settings link.
  4. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
  5. In the Edit System Variable (or New System Variable) window, append at the end of the PATH environment variable the value of terraform path ex.”c:\terraform;” . Click OK. Close all remaining windows by clicking OK.
  6. Reopen Command prompt window, and run terraform.

Windows XP

  1. Select Start, select Control Panel. double click System, and select the Advanced tab.
  2. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
  3. In the Edit System Variable (or New System Variable) window, append at the end of the PATH environment variable the value of terraform path ex.”c:\terraform;” . Click OK. Close all remaining windows by clicking OK.
  4. Reopen Command prompt window, and run terraform.

Install Terraform – Linux

  1. Download terraform for linux

     
    1
    $ wget https://releases.hashicorp.com/terraform/0.xx.x/terraform_0.xx.x_linux_amd64.zip
    • Note: Terraform is packaged as a zip archive, so 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
  2. Install unzip
     
    1
    $ sudo apt-get install unzip
  3. Unzip and set path.
     
    1
    2
    $ unzip terraform_0.11.1_linux_amd64.zip
    $ sudo mv terraform /usr/local/bin/

Install Terraform – Mac OS

The easiest and quickest way to install Terraform is using Homebrew.

 
1
$ brew install terraform

Or Manually if the latest version is not ideal for your needs.

  1. Download terraform for macos

    • Note: Terraform is packaged as a zip archive, so 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
  2. Extract files from the zip to “$HOME/Downloads/terraform” for example.
  3. The final step is to make sure that the terraform binary is available on the PATH.
  4. Copy binary to a place in the path such as /usr/local/bin/terraform
 
1
$ cp $HOME/Downloads/terraform /usr/local/bin/

Verify Install

When you’re done, you should be able to run the terraform command and get the usage information:

 
 
 
 
 

Arduino

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$ terraform
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
    console            Interactive console for Terraform interpolations
    destroy            Destroy Terraform-managed infrastructure
    env                Workspace management
    fmt                Rewrites config files to canonical format
    get                Download and install modules for the configuration
    graph              Create a visual graph of Terraform resources
    import             Import existing infrastructure into Terraform
    init               Initialize a Terraform working directory
    output             Read an output from a state file
    plan               Generate and show an execution plan
    providers          Prints a tree of the providers used in the configuration
    push               Upload this Terraform module to Atlas to run
    refresh            Update local state file against real resources
    show               Inspect Terraform state or plan
    taint              Manually mark a resource for recreation
    untaint            Manually unmark a resource as tainted
    validate           Validates the Terraform files
    version            Prints the Terraform version
    workspace          Workspace management
 
All other commands:
    debug              Debug output management (experimental)
    force-unlock       Manually unlock the terraform state
    state              Advanced state management

Link: https://www.vasos-koupparis.com/terraform-getting-started-install/

Install Terraform on Windows, Linux and Mac OS的更多相关文章

  1. 从Windows角度看Mac OS X上的软件开发

    如果原来从事Windows软件开发,想跨足或转换至Mac OS X环境,需要知道那些东西?有什么知识技能可以快速运用在Mac OS X环境上的?这两个问题应该是Windows开发者进入Mac OS X ...

  2. 常用Linux/Unix/Mac Os命令

    常用Linux/Unix/Mac OS命令 参考: 1.50 Most Frequently Used UNIX / Linux Commands (With Examples)

  3. Sqlite在Windows、Linux 和 Mac OS X 上的安装过程

    一:在 Windows 上安装 SQLite 1,下载 请访问SQLite下载页面http://www.sqlite.org/download.html,从Windows 区下载预编译的二进制文件.需 ...

  4. [Sqlite] --&gt; Sqlite于Windows、Linux 和 Mac OS X 在安装过程

    一个:于 Windows 安装 SQLite  1,下载 请訪问SQLite下载页面http://www.sqlite.org/download.html.从Windows 区下载预编译的二进制文件. ...

  5. [C] zintrin.h : 智能引入intrinsic函数。支持VC、GCC,兼容Windows、Linux、Mac OS X

    博客来源:http://blog.csdn.net/zyl910/article/details/8100744 现在很多编译器支持intrinsic函数,这给编写SSE等SIMD代码带来了方便.但是 ...

  6. Java 反编译工具 —— JAD 的下载地址(Windows版/Linux版/Mac OS 版)

    Java 反编译工具 —— JAD 的下载地址. 各种版本哦! Windows版,Linux版,Mac OS 版,等等 下载地址: http://varaneckas.com/jad/

  7. remote desktop connect btw Mac, Windows, Linux(Ubuntu) Mac,Windows,Linux之间的远程桌面连接

    目录 I. 预备 II. Mac连接Windows III. Windows连接Mac IV. Windows连接Ubuntu V. Mac连接Ubuntu VI. Ubuntu连接Mac VII, ...

  8. 桂电在linux、Mac OS环境下使用出校器(支持2.14)

    这是guetsec学长在三院科协学长所抓包逆向分析1.81版出校器的基础上,用python写的一款为Mac和linux环境开发的出校器. 最后我做了略微修改,支持暂时最新版本2.14.下面有直接从源码 ...

  9. 在windows下制作mac os x的启动安装U盘

    前几天有幸用了下Macbook pro,可在给它装win 7系统时,无知而又手贱地在windows系统下分区了:( 然后再重启就找不到Mac os x,只有win 7了.可进win 7也不正常,直接给 ...

随机推荐

  1. Python20-Day02

    1.数据 数据为什么要分不同的类型 数据是用来表示状态的,不同的状态就应该用不同类型的数据表示: 数据类型 数字(整形,长整形,浮点型,复数),字符串,列表,元组,字典,集合 2.字符串 1.按索引取 ...

  2. Ubuntu命令行安装显卡驱动

    1. sudo apt-et purge nvidia* 卸载原有驱动 2. sudo add-apt-repository ppa:graphics-drivers sudo apt-get upd ...

  3. FormsAuthentication.SetAuthCookie 方法登录

    FormsAuthentication.SetAuthCookie 方法,登录的原理. FormsAuthentication.SetAuthCookie 方法登录的过期时间. 登录相关阅读 asp. ...

  4. sed条件不修改匹配

    sed '/^echo/!s/text/subtext/g' 如果是以echo开始行首的行就不进行替换. 参考sed substitution conditional

  5. 如何在一台 web 服务器上注册CA证书

    试验环境介绍(CA的主机为192.168.23.10.httpd的主机为:192.168.23.11) 1:新建一台web服务器,主机名为www yum install -y httpd   2:生成 ...

  6. sublime text 多行代码注释快捷键

    多行选择后按下ctrl+/ 选择类 Ctrl+D 选中光标所占的文本,继续操作则会选中下一个相同的文本. Alt+F3 选中文本按下快捷键,即可一次性选择全部的相同文本进行同时编辑.举个栗子:快速选中 ...

  7. web.py 笔记

    1.涉及到id=‘id’的情况,需要加入  vars=locals()  ,因为id在python里有id() 函数 db.delete('entries', where = 'id = $id', ...

  8. Checkbox & Excel

    Checkbox & Excel Q: Excel how to check checkbox? 这个怎么打勾✔ ? A: 可以打勾的 How to Insert and Use a Chec ...

  9. jmeter 配置元件之计数器Counter

    用jmeter生成数据 我用过几种以下几种方法 1.CSV Data Set Config  参数化 2.${_Random} ${_Random}是jmeter函数助手里面自带的一个函数,作用是返回 ...

  10. shell脚本学习—正则表达式

    正则表达式概念.特点 正则表达式是对字符串操作的一种逻辑公式,就是用事先定义好的一些特定字符.及这些特定字符的组合,组成一个“规则字符串”, 这个“规则字符串”用来表达对字符串的一种过滤辑. 给定一个 ...