- These code aims at creating the following infrastucture resource on AWS for a ubuntu webserver
- VPC
- A subnet
- Network Interface
- Route table
- Subnet Route table association
- Internet gateway
- Elastic IP address
- Security group allowing trafic from port 22, 80 and 443
- Ubuntu instance with apache2 installed.
Ensure you fill in the Access and Secret keys on line 3 and 4
Run the following commands
- terraform plan (list all items to be created)
- terraform apply (to apply the plan)
Run terraform destory command if you are just practising Infrastuctre as Code, otherwise you might incure some charges.