DEV Community

Le Huy Hiep
Le Huy Hiep

Posted on

We automated our Terraform. Locally it worked fine. In CI it hung for three hours.

It worked locally ๐Ÿ˜‚ because Terraform asks for the variable it is missing, and something was there to answer. An agent, in our case, typing into the prompt.

In CI nothing types. Runner stdin never closes, so there is no timeout either. It just waits.

No error. Three hours of nothing.

Terraform wanted project_id. It was never set in CI.

Two fixes: pass it as TF_VAR_project_id, and add -input=false so it fails in two seconds instead of hanging.

The smaller cost was the three hours. The bigger one was deleting the plan gate on PRs. It hung at random and was not blocking anything, so it went.

Top comments (0)