Automating Linux Server Deployments with Terraform and Linode

YouTube player

First example

 provider "linode" {
     token = "d95ab522b717f75439d6a84455eb4239dae836d73419ff3a6dc1067e9d7de834"
 }
 
 resource "linode_instance" "my_linode" {
     label = "my_linode"
     image = "linode/debian10"
     region = "us-east"
     type = "g6-nanode-1"
     root_pass = "Supersecret!!!"
 }

Second example

 variable "linode-api-key" {}
 variable "root-password" {}
 
 provider "linode" {
     token = var.linode-api-key
 }
 
 resource "linode_instance" "my_linode_2" {
     label = "my_linode_2"
     image = "private/7692309"
     region = "us-east"
     type = "g6-nanode-1"
     root_pass = var.root-password
 }

Brand-New Course!

Check out Jay’s new course on Ansible and start automating today!

Discount Vouchers


Receive 5% off an LPI exam voucher!

Exclusive Member Features

Support the channel and receive exclusive perks!