尝试从Azure DevOps的git仓库中获取Terraform模块。
这有效,并从master分支中提取代码
模块“ my_module” {
source ="git::https://dev.azure.com/company/project/_git/MyModules//module1"
}
这不起作用,而是将我重定向到该网页。
module "my_module" {
source ="git::https://dev.azure.com/company/project/_git/MyModules//module1?ref=GT1.0"
}
答案 0 :(得分:0)
我将公共仓库https://github.com/terraform-aws-modules/terraform-aws-ecs.git导入Azure DevOps Git
module "ecs" {
source = "git::https://dev.azure.com/xxxxxxxx/terraform-aws-ecs/_git/terraform-aws-ecs?ref=v1.0.0"
name = "my-ecs"
}
我可以毫无问题地得到包裹
$ terraform get
- module.ecs
Getting source "git::https://dev.azure.com/xxxxxxxx/terraform-aws-ecs/_git/terraform-aws-ecs?ref=v1.0.0"