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

migration crashes with workspace after getting remote state #14

Closed
piizei opened this issue Jan 11, 2021 · 2 comments
Closed

migration crashes with workspace after getting remote state #14

piizei opened this issue Jan 11, 2021 · 2 comments

Comments

@piizei
Copy link

piizei commented Jan 11, 2021

I'm trying to create migration for remote state using terraform 0.13.6. Currently the migration crashes. Looks like it does not find the workspace anymore after getting the remote state.

Env: OSX
Dir: .
Terraform is inited with remote state

$terraform workspace show
cf
$ tfmigrate plan migration_1.hcl

2021/01/11 11:03:50 [INFO] [runner] load migration file: migration_1.hcl
2021/01/11 11:03:50 [INFO] [migrator] start state migrator plan
2021/01/11 11:03:52 [INFO] [migrator@.] terraform version: 0.13.6
2021/01/11 11:03:52 [INFO] [migrator@.] initialize work dir
2021/01/11 11:04:03 [INFO] [migrator@.] get the current remote state
2021/01/11 11:04:11 [INFO] [migrator@.] override backend to local
2021/01/11 11:04:11 [INFO] [executor@.] create an override file
2021/01/11 11:04:11 [INFO] [executor@.] switch backend to local
failed to switch backend to local: failed to run command (exited 1): terraform init -input=false -no-color -reconfigure
stdout:
Initializing modules...

Initializing the backend...

Successfully configured the backend "local"! Terraform will automatically
use this backend unless the backend configuration changes.

The currently selected workspace (cf) does not exist.
This is expected behavior when the selected workspace did not have an
existing non-empty state. Please enter a number to select a workspace:

  1. default

Enter a value:

stderr:

Error: Failed to select workspace: input not a valid number

@minamijoyo
Copy link
Owner

Hi @piizei , Thank you for reporting this!
The workspace has not been supported yet. See: #3

@minamijoyo
Copy link
Owner

I'll close this as duplicated #3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants