Remote-exec provisioner error

Having the same issue:

Terraform v1.0.7
aws provider v3.61.0

Error: remote-exec provisioner error

with module.sio.aws_instance.sio[0],
on …/…/modules/sio/ line 25, in resource “aws_instance” “sio”:
25: provisioner “remote-exec” {

error executing “/tmp/”: Process exited with status 1
2021-10-05T07:11:02.830-0500 [DEBUG] provider.stdio: received EOF, stopping recv loop: err=“rpc error: code = Unavailable desc = transport is closing”
2021-10-05T07:11:02.831-0500 [DEBUG] provider: plugin process exited: path=.terraform/providers/ pid=10778
2021-10-05T07:11:02.831-0500 [DEBUG] provider: plugin exited
2021-10-05T07:11:02.834-0500 [DEBUG] provider: plugin process exited: path=.terraform/providers/ pid=10791
2021-10-05T07:11:02.834-0500 [DEBUG] provider: plugin exited

Hi @nkorobko,

I moved your reply into its own topic because what you showed here doesn’t seem related to the AzureRM provider problem you originally attached it to.

This error seems to just be reporting that your provisioner script encountered an error. The remote-exec provider uploaded the script you provided to /tmp/ and then executed it. The script exited with a non-successful status, and so Terraform is reporting that status to you.

Without seeing the content of the script I can’t really speculate about what might be causing it to fail, though.

1 Like

Thanks - that was the case. My script errored out. Thank you