How to Install Terraform on Fedora 30/29/28

(: June 30, 2019)

This guide will help you to Install Terraform on Fedora 30/29/28. Terraform is a cloud-agnostic Infrastructure automation tool used to manage cloud and on-premise resources. Terraform can build, change, and version infrastructure deployed on popular service providers.

With Terraform you can manage Cloud Compute, Networking, Load Balancers, DNS and so on using simple Declarative Programming Language. See the complete list of Terraform Providers.

How to Install Terraform on Fedora 30/29/28

Terraform is distributed as a tarball on Github. Check the latest release on Terraform releases page before downloading below.{text-align:left} img{margin:0 auto 0 0}

As of the writing of this article, the latest release is v0.11.13. Download it like below:

Ensure wget is installed

sudo dnf -y install wget unzip

Then download the terraform archive.

export VER="0.12.3"

Once downloaded, extract the archive:

$ unzip terraform_${VER}
 inflating: terraform

This will create a terraform binary file on your working directory. Move this file to the directory/usr/local/bin.

sudo mv terraform /usr/local/bin/

This will make the tool accessible to all user accounts.

$ which terraform

Confirm the version installed

$ terraform -v
Terraform v0.12.3

Verify that the tool works:

$ 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

Next Steps

Now that you have Terraform installed, it is time to build infrastructure using a minimal Terraform configuration file. Terraform Use Cases is an interesting page to read.

How to Provision VMs on KVM with Terraform

Other installation guides:

For Ubuntu / Debian / CentOS, use: How to Install Terraform on Ubuntu / CentOS

Windows guys can follow Install and Use Terraform on Windows / Windows Server{text-align:left} img{margin:0 auto 0 0}

Related Posts