Postingan

Menampilkan postingan dari November, 2020

Basic Terraform to create an instance on AWS

This is basic implement infrastructure as code using terraform: First, install terraform binary, this is like a command: https://nciptandani.blogspot.com/2020/11/how-to-install-terraform-command-in.html Second, because of using AWS so install AWS-CLI and then configure it with your credentials like using AWS IAM policy EC2-Full access, in this tutorial just only to create an instance. Third, create a folder for the project mkdir learn-terraform cd learn-terraform vim main.tf   resource "aws_instance" "my-practice-www1" {   ami = "ami-015a6758451df3cb9"   instance_type = "t2.micro"   } The last, executing the terraform command. Default AWS configuration will be called automatically by the terraform so just executing that code with the terraform command below: terraform init terraform plan terraform apply So yeah just one file main.tf with some code we can create an instance on AWS but of course with the default configuration. More resources: 

How to install Terraform command in the GNU/Linux Debian

Gambar
Terraform is one of the popular tools to implement infrastructure as code (IAC). My trial is using GNU/Linux Debian. Here are two steps to install the terraform command: Terraform can be downloaded on this website: https://www.terraform.io/downloads.html Unzip it's the file to the binary PATH Reference: https://www.terraform.io/downloads.html