Terraform TGW not working

Using this resource, https://aws.amazon.com/blogs/networking-and-content-delivery/creating-a-single-internet-exit-point-from-multiple-vpcs-using-aws-transit-gateway/, I tried to deploy everything using terraform. I first manually created all the resources just to make sure this model works. When I tried to spin everything up using terraform for some reason the TGW is not routing traffic properly. Whenever I try to spin up the tgw manually it works but does not work when I use terraform. I checked all the routes, security groups, tgw attachments, route associations, and everything looks the same as when I created everything manually. Looking for some support on how to resolve this issue.