Launch an EC2 Instance in AWS

In the "Code Editor" tab, open the main.tf file.

Your task: Add a resource to launch an EC2 instance with an AMI ID of ami-0c55b159cbf677470 (Amazon Linux 2), instance type t2.micro, and associate it with the subnet defined in the VPC.

GitOps Repository

  • 📁 /root/learn-terraform-aws-ec2
    • 📄 provider.tf
    • 📄 vpc.tf
    • 📄 main.tf

Code Editor

Terminal