Sandip Patel

Let's move from "Have to" to "Want to"

Menu
  • Home
  • TECH CORNER
    • AWS
    • Networking
  • Videos
  • Expert Talk Delivered
  • Projects
  • Publications
  • About Me
Menu

Install terraform on ubuntu and Create EC2 instance on AWS using terraform script

Posted on March 25, 2020October 7, 2020 by Sandip Patel

Open terminal and download terraform using the following command:

  1. sudo apt-get update
  2. wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip
  3. sudo unzip ./terraform_0.11.13_linux_amd64.zip -d /usr/local/bin/
  4. terraform -v

Now, create terraform script and run the following command to instance:

  1. nano terraform.tf
provider "aws" {
  region     = "rerion"
  access_key = "accesskey"
  secret_key = "secretkey"
}

resource "aws_instance" "example" {
  ami = "ami-8803e0f0"
  instance_type = "t2.micro"
}
  1. terraform init
  2. terraform plan
  3. terraform apply

Note: Enter yes after apply command.

OUTPUT:

You see that Ec2 instance is running in your AWS Console.

Follow Me

               Qries

AWS Re: invent 2021 at Las Vegas

Achievements & Events

Faculty- Ambassador
Best Paper Presentation Award
AWS Academy Success Story on AWS official Blog
AWS Expert Talk 2020
USA-Conference
Paper Presentation
Conference-Team
AWS Expert Talk by IEEE 2020

RSS Recent Announcements

  • AWS Transit Gateway is now available in Asia Pacific (Melbourne) AWS Region June 2, 2023
  • Amazon Fraud Detector announces Event Orchestration with Amazon EventBridge June 2, 2023
  • Announcing fine-grained seller permissions access to AWS Marketplace Management Portal June 2, 2023
  • Amazon RDS for Oracle now supports converting instances to CDB architecture June 2, 2023
  • Amazon Interactive Video Service introduces Advanced channel types for flexible input encoding June 2, 2023

Recent Posts

  • Deployment of Website Using AWS CICD pipeline & Fargate
  • Install terraform on ubuntu and Create EC2 instance on AWS using terraform script
  • Install Cloudwatch agent on on-premises Windows server
  • Install Cloudwatch agent on on-premises Linux server
  • Deploy Flask website using AWS CLI with AWS Lambda, AWS API Gateway and Zappa
March 2020
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031  
« Feb   Mar »
web counter
©2023 Sandip Patel | WordPress Theme by SuperbThemes