我需要帮助从 gitlab 存储库中获取 terraform 模块,其中包含多个模块,如 ec2、vpc 等。我在模块 repo 中有两个分支 - 开发和主。我尝试了以下所有方法,但出现错误。我正在采购类似下面的东西。我只需要 ssh,不需要 https。
source = "git::ssh://[email protected]:repo_name/modules.git//ec2?ref=develop"
"git::ssh://[email protected]:repo_name/modules.git//ec2?ref=develop"
"git::ssh://[email protected]:repo_name/modules.git/ec2?ref=develop"
"git::ssh://[email protected]:repo_name/modules/ec2?ref=develop"
"git::ssh://[email protected]:repo_name/modules//ec2?ref=develop"
"git::ssh://[email protected]/repo_name/modules//ec2?ref=develop"
"git::ssh://[email protected]:repo_name/modules.git//ec2"
"git::ssh://[email protected]:repo_name/modules.git?ref=ec2"
"git::ssh://[email protected]:repo_name/modules.git?ref=develop//ec2"
"git::ssh://[email protected]:repo_name/modules.git/develop/ec2"
"git::ssh://[email protected]:repo_name/modules.git//ec2?ref=develop"
"git::ssh://[email protected]:repo_name/modules.git/develop/ec2"
"git::ssh://[email protected]:repo_name/modules/ec2?ref=develop"
"git::ssh://[email protected]:repo_name/modules//ec2"
这是我得到的错误
│
│ Module "ec2" (declared at compute/main.tf line 1)
│ has invalid source address
│ "git::ssh://[email protected]:repo_name/modules//ec2": Terraform
│ cannot detect a supported external module source type for