CDKTF CLI: CLI hangs if in interactive input is required during CDKTF commands #3041
Labels
bug/has-workaround
A bug with a workaround (may not be elegant)
bug
Something isn't working
priority/backlog
Low priority (though possibly still important). Unlikely to be worked on within the next 6 months.
size/medium
estimated < 1 week
ux/cli
Expected Behavior
If a module references a git repository for its source (https://developer.hashicorp.com/terraform/language/modules/sources#generic-git-repository), you may be be prompted during CDKTF commands to enter a passphrase for your SSH key or add to the list of known hosts if you have not cloned from that repo before.
Running a command such as
yarn run cdktf get
(with CDKTF set up for an npm package) should pause and show the input prompts to the user.Actual Behavior
The input prompts do very briefly appear (for maybe a single frame) but then get written over by the line
downloading and generating modules and providers...
. Trying to type in values does not work either. The CLI hangs as a result.This appears similar to #398 where the CLI hangs because it never displays a prompt and receives input from the user.
Steps to Reproduce
.tf
file e.g. something likemodule "my_module" { ... }
withsource
set to a git repository that contains a source module (https://developer.hashicorp.com/terraform/language/modules/sources#generic-git-repository)~/.ssh/known_hosts
so that you will be prompted to confirm that you trust the repo.yarn run cdktf get
Versions
language: typescript
cdktf-cli: 0.16.3
node: v19.9.0
cdktf: 0.16.3
constructs: 10.2.43
jsii: null
terraform: 1.4.6
arch: arm64
os: linux 5.15.49-linuxkit
Providers
We are using SignalFX provider
6.24
and a provider for our own in-house tool. However this is not provider-specific because the CLI is hanging before reaching anything provider-specific.Gist
No response
Possible Solutions
I suspect that the CDKTF CLI is not properly passing along stdin / allowing the process to pause and receive input from the user.
Workarounds
I had to manually run SSH commands before CDKTF, e.g. to try and prevent the case where CDKTF needs input mid-way through. There are still cases where this is not possible though.
Anything Else?
No response
References
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: