nbering / terraform-provider-ansible

"Logical" provider for integrating with an Ansible Dynamic Inventory script.
https://nbering.github.io/terraform-provider-ansible/
Mozilla Public License 2.0
329 stars 64 forks source link

provider.ansible: Incompatible API version with plugin. Plugin version: 1, Ours: 4 #1

Closed MrMarc closed 6 years ago

MrMarc commented 6 years ago

On MacOS:

1) terraform init => fine 2) terraform apply

Error: Error asking for user input: 1 error(s) occurred:

3) terraform --version Terraform v0.11.2

nbering commented 6 years ago

@MrMarc Thanks for bringing this to my attention. I've tested with v0.11.2 without issue, but admittedly, I ran with a version of Terraform built on my machine.

I'll do some more testing to see if I can replicate the issue.

nbering commented 6 years ago

TL;DR Did you build from source, or use the pre-built binaries from the releases page?

@MrMarc Did you build the plugin from source, by any chance? I wasn't able to replicate your issue from the combination of the binary I've provided, and Terraform v0.11.2 provided by the Hashicorp releases site.

I did notice though, that the path convention for the local binary was incorrectly documented, and I may need to update the file name for the plugin in my release archives. I just need to change a - into an _. https://github.com/hashicorp/terraform/issues/15705

If you happened to build this from source, Go might be picking up sources from outside the project's vendor directory, which would explain the difference in the plugin protocol version. The plugin development interface has been pretty stable for some time, so it's entirely possible it could have built from old plugin library sources, without a build error.

nbering commented 6 years ago

Created issue #2 for the filename issue.

MrMarc commented 6 years ago

No I didn't build it myself. I downloaded the pre-built darwin_amd64 version for my mac and installed it.

I did realize that I had terraform-provisioner-ansible installed, and I think that's causing the version issues. I've re-configured, and modified the name according to your other issue. Terraform seems happy now.

Driver error ... sorry

Marc

nbering commented 6 years ago

@MrMarc No problem! Glad you got it sorted out, and I'm pleased you managed to find my little project. 😃