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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform CLI waits for variable input forever if variables are missing #2425

Closed
ansgarm opened this issue Dec 15, 2022 · 2 comments 路 Fixed by #2455
Closed

Terraform CLI waits for variable input forever if variables are missing #2425

ansgarm opened this issue Dec 15, 2022 · 2 comments 路 Fixed by #2455
Assignees
Labels
bug Something isn't working cdktf-cli ux/cli
Milestone

Comments

@ansgarm
Copy link
Member

ansgarm commented Dec 15, 2022

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

image

As of #1955 we now invoke Terraform interactively for applying, which causes it to ask for input (e.g. for variables) and to wait basically forever. So the UX to users that don't know Terraform and this output will be confusing.
We have two main options here:

  1. Detect when TF asks for input (which we don't support) and crash with an error message that users need to supply variables via TF_VAR_ env variables.
  2. Support passing various inputs to the TF CLI (basically extending the "wait for approval" logic for different kinds of questions).

Option 1 is simpler and possibly a good first stepping stone (as detecting those questions is also required for option 2). I'd propose to start with option 1 and then create a follow-up issue to implement option 2 at some point.

References

@ansgarm ansgarm added enhancement New feature or request cdktf-cli ux/cli labels Dec 15, 2022
@ansgarm ansgarm added this to the 0.15 milestone Dec 15, 2022
@ansgarm ansgarm added bug Something isn't working and removed enhancement New feature or request labels Dec 15, 2022
@DanielMSchmidt
Copy link
Contributor

Same problem with abort, if terraform is killed it sends

Do you want to cancel the remote operation?
  Only 'yes' will be accepted to cancel.

  Enter a value: yes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working cdktf-cli ux/cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants