Terraform modules query

Hi all,

I’m wondering if it is possible to set this up. We want to deploy about 12 lambda functions, some will have environment variables, triggers etc and some won’t.

We use tfvars to declare all of our variables and I’m planning to use a lambda module. Can you have it so for example, if no trigger config is given terraform won’t create that resource and won’t error as no value has been given?

Or do I have to have use multiple modules? I’m hoping I can use one module that will cover all options.

Thank you