Best practice when use Terraform public modules

Both

It depends what you are needing to do and the module in question.

As an example we use the AWS security group module from GitHub - terraform-aws-modules/terraform-aws-security-group: Terraform module which creates EC2-VPC security groups on AWS πŸ‡ΊπŸ‡¦ whenever we need a SG - both within our own modules and directly in root modules.

We also use the EKS module at GitHub - terraform-aws-modules/terraform-aws-eks: Terraform module to create an Elastic Kubernetes (EKS) cluster and associated resources πŸ‡ΊπŸ‡¦ but only wrapped in our own module, which sets various business specific settings (so there is less boilerplate code where it gets used).

1 Like