Unable to pass value to variable in terraform module. terraform module is stored in another git repo

module "code_commit"{
    source="git::codecommit::*************/module/code_commit.git?ref=test"
    
     repo_name="first"
        
    
}

which gives error when run command terraform plan

│ Error: Unsupported argument
│ 
│   on main.tf line 5, in module "code_commit":
│    5:         repo_name="first"
│ 
│ An argument named "repo_name" is not expected here.

i have created variable.tf and added variable repo_name in module in another git repo.

variable “repo_name”{
type=string
description=“repository name”
}

After terraform init its downloading terraform module and placing it in .terraform file. But when terraform validate command is run it show the error of “Unsupported argument”

Hi @yihaca2868,

This error message suggests that the module you’ve referred to does not have a variable "repo_name" block, and therefore does not accept an argument named repo_name.

You’ll need to either find the name that this module is actually expecting, or modify the module to include a declaration of that variable.

i have created variable.tf and add variable repo_name in module in git repo.

variable “repo_name”{
type=string
description=“repository name”
}

After terraform init its downloading terraform module and placing it in .terraform file. But when terraform validate command is run it show the error of “Unsupported argument”