Terraform-Assignment-1
For a complete detailed solution with step by step, click this link: https://medium.com/devops-guides/create-an-ec2-instance-using-terraform-assignment-1-1ba0e2e89c68
Step 1: Create a "Master" Machine on Amazon EC2. Install terraform using "terraform-install.sh" using bash command.
Step 2: Create a script to create a basic EC2 Instance & paste the script into "main.tf" file.
Step 3: Initialize the "Terraform" using the command: terraform init
Step 4: To create the plan, use this command: terraform plan
Step 5: Run the script using the command: terraform apply
Step 6: Instance will be created with default settings in the "Ohio" region.
Step 7: Go to the "EC2" section & an EC2 instance named as "assignment-1" will be successfully created.