-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with validating and applying the code #2
Comments
I found some useful links about ""Invalid operation for device '3'"", it seems it's a bug about vSphere provider and also reported here: hashicorp/terraform-provider-vsphere#1016 |
I also hit the first error with |
Using VMware provider 1.15.0 worked for me. |
When I use "terraform -validate" I get these error :
│ Error: Unsupported block type
│
│ on main.tf line 112:
│ 112: provisioner "file" {
│
│ Blocks of type "provisioner" are not expected here.
╵
╷
│ Error: Unsupported block type
│
│ on main.tf line 117:
│ 117: provisioner "local-exec" {
│
│ Blocks of type "provisioner" are not expected here.
If I use both provisioner blocks and in the (resource "vsphere_virtual_machine" "standalone") block the error change to :
│ Error: Missing required argument
│
│ on main.tf line 100, in resource "vsphere_virtual_machine" "standalone":
│ 100: provisioner "local-exec" {
│
│ The argument "command" is required, but no definition was found.
╵
╷
│ Error: Unsupported argument
│
│ on main.tf line 101, in resource "vsphere_virtual_machine" "standalone":
│ 101: inline = [
│
│ An argument named "inline" is not expected here.
I edited provisioners code with this and I can validate the code:
Run command on the local machine to run Ansible
provisioner "local-exec" {
command = "ansible-playbook playbook.yml"
}
But when I use "terraform apply " , after cloning from template the cli return this error :
Error: error reconfiguring virtual machine: error reconfiguring virtual machine: Invalid operation for device '3'.
│
│ with vsphere_virtual_machine.standalone,
│ on main.tf line 53, in resource "vsphere_virtual_machine" "standalone":
│ 53: resource "vsphere_virtual_machine" "standalone" {
Did anyone face with this error ?
The text was updated successfully, but these errors were encountered: