Cloud Functions environment variables

I have many cloud functions and I want a environment variable to be added to only one cloud function. I have created a terrafrom module and using the module to create multiple functions on main.tf. I want to add a environment variable (name = test) to one of cloud function on which a variable (var.cf_env) is true. The env variable should not be added to cloud functions if var.cf_env is false. How can I achieve this?