Terraform latest version not support generic module folder - pathspec

Hi Team,
I have one bitbucket repository and ther i created one folder for generic terraform module.
In main.tf i used source = “referring module folder”. But its not taking and throwing pathspec not match error.

Please help to fix this.

Error "-

Could not download module “bis” (main.tf:499) source code from
“git::ssh://git@bitbucket.xxxxx.xxx/test-repo/aip-bis-app?ref=3.0.0//bis-tf”:
error downloading
‘ssh://git@bitbucket.xxxxx.xxx/test-repo/aip-bis-app?ref=3.0.0//bis-tf’:
/bin/git exited with 1: error: pathspec ‘3.0.0//bis-tf’ did not match any
file(s) known to git.

Hi @micemuni,

Terraform is interpreting //bis-tf as part of your branch/tag name in ref because you placed it at the end of the ref= argument. The correct location for that subdirectory portion is at the end of the path, like this:

git::ssh://git@bitbucket.xxxxx.xxx/test-repo/aip-bis-app//bis-tf?ref=3.0.0

Then Terraform should understand it as being the bis-tf subdirectory rather than as a branch called 3.0.0//bis-tf.