Postingan

Menampilkan postingan dengan label IAC

How to install terragrunt

Terragrunt is a thin wrapper that provides extra tools for keeping your configurations DRY, working with multiple Terraform modules, and managing remote state. https://terragrunt.gruntwork.io / Steps to install terragrunt command: 1. Download from releases page   https://github.com/gruntwork-io/terragrunt/releases 2. Download the binary for your OS: e.g., On Linux wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.37.1/terragrunt_linux_amd64  3. Add execute permissions to the binary. E.g., On Linux chmod u+x terragrunt_linux_amd64 4. Put the binary somewhere on your PATH. E.g., On Linux  mv  terragrunt_linux_amd64  /usr/local/bin/terragrunt 5. Check installation terragrunt --version

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