Module vs resources

In order to create VPC or EKS or similar resources, terraform provides both separate modules for these or we can use the resources. Can someone please let me know which amongst the two is more recommended?

Thanks.

Both can work well, but really vary depending on your feelings about third party components & the limitations they bring.

Doing everything yourself (making your own module/using the resources directly) gives you the most flexibility around exactly what is done & how it is achieved, but it is also potentially the most effort.

Using a well regarded third party module means you can benefit from all the work already undertaken, but you would no longer have the level of control - updates will probably be fairly frequent (some of which might require additional effort), and some of the decisions made about how it will work might not be in line with your choices (so you either have to live with their approach or migrate to your own module).

We use the EKS module at GitHub - terraform-aws-modules/terraform-aws-eks: Terraform module to create an Elastic Kubernetes (EKS) cluster and associated worker instances on AWS πŸ‡ΊπŸ‡¦ and use Renovate bot to keep our usage up to date. There are occasional breaking changes (generally yearly) which require more work, but overall we have found that it suits us well.