Posts

Showing posts from February, 2022

Launching EC2 using Terraform | Installing Grafana and promotues using Terraform.

  Launching EC2 instance using Terraform: The set of files used to describe infrastructure in Terraform is known as a Terraform  configuration . You will write your first configuration to define a single AWS EC2 instance. Each Terraform configuration must be in its own working directory. Create a directory for your configuration. $ mkdir learn-terraform-aws-instance Copy Change into the directory. $ cd learn-terraform-aws-instance Copy Create a file to define your infrastructure. $ touch main.tf Copy Open  main.tf  in your text editor, paste in the configuration below, and save the file. Tip:  The AMI ID used in this configuration is specific to the  us-west-2  region. If you would like to use a different region, see the  Troubleshooting section  for guidance. terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 3.27" } } required_version = ">= 0.14.9" } provider "aws"