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

Migrating from local state to remote state doesn't work #168

Closed
anubhavmishra opened this issue Jul 15, 2020 · 2 comments
Closed

Migrating from local state to remote state doesn't work #168

anubhavmishra opened this issue Jul 15, 2020 · 2 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@anubhavmishra
Copy link
Member

If a user has initialized a new CDK for Terraform project using the --local option. If they migrate to the remote state using the stack override option, they will need to do a terraform init which will prompt them to copy the local state to the remote state backend. Here is what it looks like.

terraform init

Initializing the backend...
Do you want to copy existing state to the new backend?
  Pre-existing state was found while migrating the previous "local" backend to the
  newly configured "remote" backend. No existing state was found in the newly
  configured "remote" backend. Do you want to copy this state to the new "remote"
  backend? Enter "yes" to copy and "no" to start with an empty state.

  Enter a value:

This will hang if terraform init is triggered via cdktf diff or cdktf deploy as terraform init is waiting for confirmation from the user.

cdktf deploy
⠏ initializing hello-terraform...

We need to provide a path for the user to safely migrate from local to the remote state store.

@anubhavmishra anubhavmishra added bug Something isn't working documentation Improvements or additions to documentation labels Jul 15, 2020
@anubhavmishra
Copy link
Member Author

I am working to document this issue. We will plan to address when we have thought about the Terraform Cloud workflow.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2022

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 Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant