Skip to content
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 reading tfstate: 0.12 error #144

Open
nickelghost opened this issue Mar 27, 2020 · 2 comments
Open

Error reading tfstate: 0.12 error #144

nickelghost opened this issue Mar 27, 2020 · 2 comments

Comments

@nickelghost
Copy link

Hello, the program is not working for me because of that error. I have a terraform.tfstate file generated with 0.12 in the directory where I'm running the command. The state includes one aws_instance. I'm on macOS Catalina.

 ~/Documents/Code/infrastructure   master ●  ansible --inventory-file=/usr/local/bin/terraform-inventory all -m ping
[WARNING]:  * Failed to parse /usr/local/bin/terraform-inventory with script plugin: Inventory script (/usr/local/bin/terraform-inventory) had an execution error: Error reading tfstate file: 0.12
format error: <nil>; pre-0.12 format error: <nil> (nil error means no content/modules found in the respective format)
[WARNING]:  * Failed to parse /usr/local/bin/terraform-inventory with yaml plugin: 'utf-8' codec can't encode characters in position 0-3: surrogates not allowed
[WARNING]:  * Failed to parse /usr/local/bin/terraform-inventory with ini plugin: /usr/local/bin/terraform-inventory:2: Expected key=value host variable assignment, got:
H__PAGEZEROx__TEXT�
[WARNING]: Unable to parse /usr/local/bin/terraform-inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: embedded null byte
���� | FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}
@justinas
Copy link

justinas commented Apr 2, 2020

I think this is a duplicate of #131

@nickelghost
Copy link
Author

I wasn't sure so I created a separate issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants