Variable files such as variables.tf and terraform.tfvars were used to make the script dynamic
The Public IP of the web server (EC2 instance) and it's instance-id is made available using outputs.tf for easy access
Resources Created
- VPC
- A subnet
- An internet gateway
- A route table that was attached to the subnet
- Route to the internet gateway
- A security group for the EC2 instance which allow ssh and http access only
- An EC2 instance with user data scripts to install, enable and start nginx server with custom html loaded