Error: Reference to undeclared input variable in Terraform registry module

I am getting following error while I try to run module from registry-

 Error: Reference to undeclared input variable
│ 
│   on main.tf line 7, in provider "aws":
│    7:     role_arn = "arn:aws:iam::${var.CCS_member_account_id}:role/OrganizationAccountAccessRole"
│ 
│ An input variable with the name "CCS_member_account_id" has not been declared. This variable can be declared
│ with a variable "CCS_member_account_id" {} block.

I have my var file in an repo/example/test, I think terraform registry looks for var file in /repo folder which only has a readme since actualk tf files are located in /test. If I copy paste the var file in /repo folder it works. Why terraform registry is working like that? any solution?

There is not enough information in this post for people to be able to help you:

You’ve said you are using something from the Terraform Registry - but what? It contains many modules.

You have mentioned a “var file”, but not told us what it contains or where it is located relative to main.tf.