terra-farm / terraform-provider-virtualbox

VirtualBox provider for Terraform
https://terra-farm.github.io/provider-virtualbox/
MIT License
324 stars 136 forks source link

Error: Failed to instantiate provider "virtualbox" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5] #59

Closed basictheprogram closed 5 years ago

basictheprogram commented 5 years ago
$ terraform --version
Terraform v0.12.3
+ provider.virtualbox (unversioned)

main.tf

resource "virtualbox_vm" "node" {
    count = 2
    name = "${format("node-%02d", count.index+1)}"
    url = "https://vagrantcloud.com/ubuntu/boxes/xenial64/versions/20180420.0.0/providers/virtualbox.box"
    image = "./virtualbox.box"
    cpus = 2

     network_adapter {
       type = "bridged"
       host_interface="en0"
    }
}
$ terraform init
$ terraform plan

Error: Failed to instantiate provider "virtualbox" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]
VoyTechnology commented 5 years ago

It looks like it might be related to the provider using an older version of Terraform: https://github.com/terra-farm/terraform-provider-virtualbox/blob/c4fcdba845e54a69638f7d6ba34037caf8b6246f/go.mod#L8

This would be part of #50 to get it fixed.

VoyTechnology commented 5 years ago

@basictheprogram You also are using both url and image, these two fields have been merged. Please take a look at the README. It would turn into

image = "https://vagrantcloud.com/ubuntu/boxes/xenial64/versions/20180420.0.0/providers/virtualbox.box"

This is probably not related, just a FYI.

ringods commented 5 years ago

@basictheprogram we have released a TF 0.12 compatible version. You can download it here:

https://github.com/terra-farm/terraform-provider-virtualbox/releases/tag/v0.2.0

abhi-vaidya commented 4 years ago

Any plans to make this plugin available for windows ? https://github.com/terra-farm/terraform-provider-virtualbox/releases/tag/v0.2.0