gpt4 book ai didi

Terraform - 无法从 github 获取模块

转载 作者:行者123 更新时间:2023-12-04 01:07:44 29 4
gpt4 key购买 nike

我正在尝试从 github 获取一个 terraform 模块,如下所示:

module "example" {
source = "https://github.com/cloudposse/terraform-example-module.git?ref=master"
example = "Hello world!"
}
当我运行 terraform init ,我收到以下错误:
Error: Failed to download module

Could not download module "example" (main.tf:6) source code from
"https://github.com/cloudposse/terraform-example-module.git?ref=master": error
downloading
'https://github.com/cloudposse/terraform-example-module.git?ref=master': no
source URL was returned
我确认 repo 确实存在..我错过了什么?

最佳答案

不应该有 https://一开始。所以应该是:

module "example" {
source = "github.com/cloudposse/terraform-example-module.git?ref=master"
example = "Hello world!"
}

关于Terraform - 无法从 github 获取模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65856078/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com