Week 9 practice
Description
For this practice assignment, see if you can create a terraform file that does the following:
- Create an ec2 instance
- t2.micro
- based on ubuntu #must be based on ubuntu for busybox to work
- allows incoming traffic to port 22 and 8080
- copies your public ssh key to the instance
The documentation for aws is found here
The user data that the ec2 instance should launch is:
#!/bin/bash
echo "Hello, World" > index.html
nohup busybox httpd -f -p 8080 &
You should be able to ssh to the instance without using the labsuser.pem and connect to port 8080 of the instance.
After you have written your solution, you can check mine here
Last Updated 02/07/2025