In this project I will take a resource that creates an EC2 instance and restructure it into a custom Terraform module. The…