DevOps/Terraform

From Wikiversity
(Redirected from Terraform)
Jump to navigation Jump to search

Terraform is an open source software first released in July 2014 that allows to create new resources in Cloud providers, also called Infrastructure as Code (IaC). Supported Cloud providers includes AWS, IBM Cloud, Google Cloud Platform, Linode, Microsoft Azure, Oracle Cloud Infrastructure, VMware vSphere and OpenStack.

Other infrastructure as code software software is AWS Cloudformation


It supports services/providers that can be managed by APIs, such as OpenStack VMWare vSphere or CloudStack.

And since September 2019 also offers a Cloud Service: Terraform Cloud [1].

Installing[edit | edit source]

  • MacOS: brew install terraform
  • Check version: terraform -v (See Changelog[2])

Common terraform commands[3][edit | edit source]

   apply              Builds or changes infrastructure
   console            Interactive console for Terraform interpolations
   destroy            Destroy Terraform-managed infrastructure
   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 new or existing Terraform configuration
   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 Terraform Enterprise 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

Activities[edit | edit source]

  1. Read Terraform Changelog: https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md

See also[edit | edit source]

  1. https://www.hashicorp.com/blog/announcing-terraform-cloud/
  2. https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md
  3. https://www.terraform.io/docs/commands/index.html