image
Terraform CLI

Contents

Introduction
1
Introduction
PREVIEW2m 7s
Terraform Introduction
2
Terraform CLI
Terraform Language
Wrap Up
12
Start course
Difficulty
Intermediate
Duration
1h 41m
Students
8541
Ratings
4.3/5
starstarstarstarstar-half
Description

Terraform is an open source "Infrastructure as Code" tool, used by DevOps and SysOps engineers to codify their cloud infrastructure requirements.

In this course you'll learn about Terraform from the ground up, and how it can be used to codify infrastructure. Terraform can be used to provision infrastructure across multiple cloud providers including AWS which this course will focus on.

resource "aws_instance" " cloudacademy " {
ami = data.aws_ami.ubuntu.id
instance_type = var.instance_type
key_name = var.key_name 
subnet_id = aws_subnet.private.id
security_groups = [aws_security_group.webserver.id]
 
user_data =<<EOFF
#!/bin/bash
read -r -d '' META <<- EOF
CloudAcademy ♥ Terraform!
For any feedback, queries, or suggestions relating to this course
please contact us at:
Support: support@cloudacademy.com
LinkedIn: https://www.linkedin.com/in/jeremycook123
EOF
echo "$META"
EOFF

tags = {
Org = "CloudAcademy"
Course = "Terraform 1.0"
Author = "Jeremy Cook"
}
}

Learning Objectives

  • Learn about Terraform and how to use it to provision AWS infrastructure
  • Learn how to build and create Terraform configurations and modules
    Learn how to use the Terraform CLI to launch and manage infrastructure on AWS

Intended Audience

  • Anyone interested in learning about Terraform, and the benefits of using it to codify infrastructure
  • Anyone interested in building and launching AWS infrastructure using Terraform
  • Anyone interested in deploying cloud native applications on AWS

Prerequisites

Prerequisites which would be considered useful for this course are:

  • Knowledge of the AWS cloud platform and the various services within it – particularly VPC, EC2, and IAM
  • Basic System administration experience
  • Basic Infrastructure and Networking Knowledge
  • Basic SysOps and/or DevOps Knowledge

Resources

All Terraform configuration as used within the provided demonstrations is located in GitHub here:

Transcript

Welcome back. In this lesson, I'll review the installation process for installing the open-source version of Terraform locally. Now the good news is since Terraform is packaged as a single binary, installation is very simple and quick, as you'll soon see. Let's begin.

Terraform provides operating system specific downloads for all of the most popular desktop or workstation operating systems, including macOS, Linux, and Windows. Clicking on any of the provided download links will download a ZIP archive. Once downloaded, it is just a case of unzipping the archive and then moving the single Terraform executable binary within to a location configured on your operating system's system PATH. It's literally that easy.

Now if you're looking for a more automated or scripted approach for a macOS-based system, then the following script displayed here can be used to download and install the latest version of the Terraform CLI, hands-off. The script provided on the screen is specific to macOS. This script will also set up autocompletion for the Terraform subcommands. Likewise, for Linux, this script can, again, be used to install the latest version of Terraform CLI automatically. And for Windows, the process provided here is a bit more manual, but in a sense, just requires you to move the Terraform binary to a location, as previously mentioned, configured in the current system PATH environment variable.

About the Author
Students
132929
Labs
68
Courses
111
Learning Paths
181

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, Azure, GCP), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).