tofuutils / tenv

OpenTofu / Terraform / Terragrunt and Atmos version manager
https://tofuutils.github.io/tenv/
Apache License 2.0
662 stars 32 forks source link

tenv 2.2.0 breaks terraform apply: `error asking for approval: EOF` #192

Closed ThibaultNocchi closed 3 months ago

ThibaultNocchi commented 3 months ago

Describe the bug In tenv 2.2.0, I can't apply as I can't answer yes to the prompt:

Plan: 0 to add, 1 to change, 0 to destroy.
╷
│ Warning: Resource targeting is in effect
│
│ You are creating a plan with the -target option, which means that the result of this plan may not
│ represent all of the changes requested by the current configuration.
│
│ The -target option is not for routine use, and is provided only for exceptional situations such
│ as recovering from errors or mistakes, or when Terraform specifically suggests to use it as part
│ of an error message.
╵

Do you want to perform these actions in workspace "nonprod"?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: ╷
│ Error: error asking for approval: EOF
│
│
╵

I'm guessing it may be linked to #191.

To Reproduce Steps to reproduce the behavior:

  1. Ensure tenv is v2.2.0
  2. Run a manual TF apply
  3. Get the error message, which stops the apply procedure

Expected behavior EOF shouldn't be fed to the terraform binary I guess?

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context I rollbacked to 2.1.8 and it works.

kvendingoldo commented 3 months ago

Thank you for reporting, we'll check it asap

dvaumoron commented 3 months ago

@ThibaultNocchi, can you check that things work as expected with v2.2.1 ?

voron commented 3 months ago

2.2.1 fixed it for me

dvaumoron commented 3 months ago

2.2.1 fixed it for me

Happy to see that, I apologize for this impactful mistake

ThibaultNocchi commented 3 months ago

It also works for me, thank you for the quick fix!