[英]Terraform: using the vsphere provider in an offline windows environment
我想在无法访问 Internet 的 windows 机器上使用 terraform vsphere 提供程序。 我已经从这里下载了 terraform (v0.14.9) 和最新的 vsphere 提供程序 (v1.25.0) 从这里下载并将它们复制到离线机器。 但是,我不知道如何配置 Terraform 所以它在调用 init、plan、apply 和 destroy 命令时指的是我的离线 vsphere 提供程序。
我已将“terraform.exe”保存在 C:/tools 目录中并设置了我的环境变量。
C:/tools/terraform.d/plugins/registry.terraform.io/hashicorp/vsphere/terraform-provider-vsphere_v1.25.0_x4.exe
并将以下内容添加到 mytf 文件的顶部: terraform {
required_providers {
vsphere = {
source = "registry.terraform.io/hashicorp/vsphere"
version = "~> 1.25.0"
}
}
}
C:/tools/plugins/terraform-provider-vsphere_v1.25.0_x4.exe
)并在 init 命令中引用它: terraform init -input=false -plugin-dir=C:/tools/plugins)
尝试一次尝试连接到互联网(失败)并尝试两次给出以下失败响应:
正在初始化后端...
正在初始化提供程序插件...查找匹配“~> 1.25.0”的 hashcorp/vsphere 版本...
错误:无法查询可用的提供程序包
无法检索提供程序 hashcorp/vsphere 的可用版本列表:在任何搜索位置均未找到提供程序注册表。terraform.io/hashicorp/vsphere
-C:/工具/插件
所以我扩展了 vsphere 插件的目录如下: C:/tools/plugins/registry.terraform.io/hashicorp/vsphere/terraform-provider-vsphere_v1.25.0_x4.exe
但它仍然不起作用并显示相同的错误消息?
follow in bellow - https://www.terraform.io/upgrade-guides/0-14.html using in cli using terraform: type terraform upgrade.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.