adammck / terraform-inventory

Terraform State → Ansible Dynamic Inventory
MIT License
1.82k stars 321 forks source link

Cannot get --list to work #116

Open drew9781 opened 5 years ago

drew9781 commented 5 years ago

I'm struggling here. I'm not sure if I'm doing something wrong, but I can't get the command to work at all. I'm using this with terraform 0.12.0

aenglema@ubuntu_template:~/terraform$ terraform-inventory --list
Usage: terraform-inventory [options] path
path: this is either a path to a state file or a folder from which `terraform commands` are valid

My terraform.tfstate file is in the same directory. Terraform show -json works.

systembell commented 5 years ago

I'm having the same issue on Terraform v0.12.2.

astubbs commented 5 years ago

Same issue. There's a bug in the code logic - the error message is incorrect it would seem. But my go-fu is not strong enough to read it..

astubbs commented 5 years ago

Oh - it's probably https://github.com/adammck/terraform-inventory/issues/113

astubbs commented 5 years ago

Fixed in https://github.com/adammck/terraform-inventory/pull/114 - check out that branch and try it - works for me.