Skip to content

action hangs with terraform_wrapper: true when variables aren't defined #150

@jorupp

Description

@jorupp

I was following https://learn.hashicorp.com/tutorials/terraform/github-actions, but forgot to prefix my environment variables with TF_VAR_, so they weren't being populated, causing terraform plan to prompt for them at runtime. However, with terraform_wrapper: true (the default), the terraform plan just ran for a while (I killed it after 10 minutes) without exiting. Once I disabled the wrapper, it exited with an error in a second. Based on that message, I was able to find and fix my error, and with that fixed, it worked with the wrapper again.

I wonder if terraform plan when run with the wrapper is waiting for an input that will never come to it's "enter a value for the variable" prompt? If so, I wonder if the fix involves passing an empty input to @actions/exec.exec?

const options = {
listeners,
ignoreReturnCode: true
};
const exitCode = await exec(pathToCLI, args, options);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions