Terraform설치

[Tool]Terraform설치

Terraform은 Windows、Linux、Mac OS에서 사용 가능
이것으로 설치는 완료

Linux설치 예제(CentOS 2016.2.15기준)
  • Terraform파일 다운로드
  • Download파일 압축 해제
$ ls -al
-rw-r--r--   1 root root 153340827 Feb  2 05:01 terraform_0.6.11_linux_amd64.zip
$ unzip terraform_0.6.11_linux_amd64.zip
$ cd terraform_0.6.11_linux_amd64
$ ls -al
-rwxr-xr-x  1 root root 26557064 Feb  2 04:17 terraform
-rwxr-xr-x  1 root root 14952136 Feb  2 04:17 terraform-provider-atlas
-rwxr-xr-x  1 root root 42663384 Feb  2 04:20 terraform-provider-aws
-rwxr-xr-x  1 root root 17985816 Feb  2 04:19 terraform-provider-azure
-rwxr-xr-x  1 root root 23355368 Feb  2 04:19 terraform-provider-azurerm
-rwxr-xr-x  1 root root 15061280 Feb  2 04:20 terraform-provider-chef
-rwxr-xr-x  1 root root 14837280 Feb  2 04:20 terraform-provider-cloudflare
-rwxr-xr-x  1 root root 26391560 Feb  2 04:17 terraform-provider-cloudstack
-rwxr-xr-x  1 root root 15221056 Feb  2 04:17 terraform-provider-consul
.
.
.
-rwxr-xr-x  1 root root 16191808 Feb  2 04:20 terraform-provisioner-remote-exec
  • 편리하게 이용하기 위해 링크를 이용(필수 아님)
$ ln -s /root/terraform_0.6.11_linux_amd64/terraform /usr/bin/
  • Terraform동작 확인
$ terraform
usage: terraform [--version] [--help] <command> [<args>]

Available commands are:
    apply      Builds or changes infrastructure
    destroy    Destroy Terraform-managed infrastructure
    get        Download and install modules for the configuration
    graph      Create a visual graph of Terraform resources
    init       Initializes Terraform configuration from a module
    output     Read an output from a state file
    plan       Generate and show an execution plan
    push       Upload this Terraform module to Atlas to run
    refresh    Update local state file against real resources
    remote     Configure remote state storage
    show       Inspect Terraform state or plan
    taint      Manually mark a resource for recreation
    version    Prints the Terraform version
$ terraform -version
Terraform v0.6.11

다음 포스팅에는 테라폼을 이용하여 AWS에서 EC2를 생성하고 삭제하는 과정을 포스팅 할 예정

댓글