我正在使用这个提供程序 - [shekeriev/virtualbox/0.0.4][1]
terraform -v
Terraform v1.3.6
on windows_amd64
+ provider registry.terraform.io/shekeriev/virtualbox v0.0.4
我的配置文件main.tf
terraform {
required_providers {
virtualbox = {
source = "shekeriev/virtualbox"
version = "0.0.4"
}
}
}
provider "virtualbox" {
# Configuration options
}
resource "virtualbox_vm" "node" {
count = 1
name = format("node-%02d", count.index + 1)
image = "https://app.vagrantup.com/ubuntu/boxes/xenial64/versions/20190507.0.0/providers/virtualbox.box"
cpus = 1
memory = "512 mib"
network_adapter {
type = "hostonly"
device = "IntelPro1000MTDesktop"
host_interface = "VirtualBox Host-Only Ethernet Adapter"
}
}
我正在打字
terraform init
terraform plan
terraform apply
yes
并收到此错误!
Error: failed to unpack image https://app.vagrantup.com/ubuntu/boxes/xenial64/versions/20190507.0.0/providers/virtualbox.box: error unpacking gold image virtualbox.box: exit status 2
│
│ with virtualbox_vm.node[0],
│ on main.tf line 18, in resource "virtualbox_vm" "node":
│ 18: resource "virtualbox_vm" "node" {
我尝试了不同的图像和提供商 terra-farm,但毕竟他们返回了此错误。 [1]:https://registry.terraform.io/providers/shekeriev/virtualbox/0.0.4
似乎无法再访问 https://app.vagrantup.com/ubuntu/boxes/xenia164/versions/20190507.0.O/providers/virtualbox.box(错误 404)。尝试使用不同的、更新的图像。