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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive prompt for state management on init wont let you select no for TF cloud #2952

Closed
1 task
LiamLeane opened this issue Jun 16, 2023 · 5 comments · Fixed by #2977 or #2987
Closed
1 task
Labels
bug Something isn't working confirmed independently reproduced by an engineer on the team priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@LiamLeane
Copy link

Expected Behavior

When performing an init the question

? Do you want to continue with Terraform Cloud remote state management? (Y/n)

Is asked. Entering n should not use TF Cloud

Actual Behavior

Any value entered at all (even invalid) results in yes being selected

? Do you want to continue with Terraform Cloud remote state management? yes

Steps to Reproduce

  1. cdktf init
  2. Enter n for TF cloud question

Versions

cdktf-cli: 0.17.0
node: v18.12.1
terraform: 1.3.6
arch: x64
os: win32 10.0.22621

Providers

No response

Gist

No response

Possible Solutions

No response

Workarounds

No response

Anything Else?

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

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
@LiamLeane LiamLeane added bug Something isn't working new Un-triaged issue labels Jun 16, 2023
@matttylr
Copy link

Have just upgraded to 0.17.0 on my m1 macbook via brew. cdktf always chooses the positive answer regardless of what is entered:

mattt@xepi scratch % mkdir cdktfbug
mattt@xepi scratch % cd cdktfbug
mattt@xepi cdktfbug % cdktf init --template="typescript" --local
Note: By supplying '--local' option you have chosen local storage mode for storing the state of your stack.
This means that your Terraform state file will be stored locally on disk in a file 'terraform.<STACK NAME>.tfstate' in the root of your project.
? Project Name cdktfbug
? Project Description A simple getting started project for cdktf.
? Do you want to start from an existing Terraform project? yes.   <--- I entered 'n' here
? Please enter the path to the Terraform project
? Do you want to send crash reports to the CDKTF team? Refer to https://developer.hashicorp.com/terraform/cdktf/create-and-deploy/configuration-file#enable-crash-reporting-for-the-cli for more information yes.    <--- Also entered 'n' here

@andrewinci
Copy link

Same for me

@xiehan xiehan added confirmed independently reproduced by an engineer on the team priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed new Un-triaged issue labels Jun 23, 2023
@ozyman42
Copy link

ozyman42 commented Jun 28, 2023

Is there an older version of cdktf I can use when I don't want to be forced to select yes for everything?

EDIT: ran

npm un -g cdktf-cli
npm i -g cdktf-cli@0.16.3

and now when I enter no as input it's respected.

@mutahhir
Copy link
Member

mutahhir commented Jul 3, 2023

Sorry for the delay on this. #2977 should solve the problem. We'll try to get a patch release out with the fix soon.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 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 Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working confirmed independently reproduced by an engineer on the team priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
6 participants