-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
"Unknown provider" when upgrading to 0.13 with a non-default state file name #25920
Comments
I'm still working out the precise details, but this relates to the fact that terraform init does not support the I'm not sure if this workaround is useful for your situation, but if you want to use an alternative state path without having to use
The difference between using the flag vs. using the backend is that terraform stores the backend configuration in a pseudo-statefile, and terraform init parses that to find (among other things) the correct state path:
|
After some more digging, and an internal discussion about the workaround, I am going to re-label this as a documentation issue, since we aren't going to add the Perhaps we could start by just adding some words to the docs describing these options as "legacy" and not well supported, and also call out the |
It's not much, but I just added some words to the |
Hi @mildwonkey. I'm having a similar issue but my issue is that I cannot run UPDATE: Here's my output from the destroy command:
Any insight you can provide would be awesome! |
Just thought I would leave an update. I figured out how to make this work. Our TF state files were stored in a database and then we have a process to query them, write them to disk and then fork-exec Terraform using those files. To fix this, I added some code that would search and replace all of the Once I cleared out the broken Here's my Java code to do the search and replace:
And here's my update to the
|
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 have 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. |
Terraform 0.13 commands cannot be run on a state file created under Terraform 0.12 with a non-default name, because the provider FQNs are not migrated.
Terraform Version
terraform012
: 0.12.29terraform013
: 189f9fa (0.13.1-dev)Terraform Configuration Files
Steps to Reproduce
terraform012 init
terraform012 apply -state=foo
terraform013 init
terraform013 apply -state=foo
Expected Behavior
All commands should be successful.
Without
-state=foo
, i.e. using the default state file name, this works.Actual Behavior
Init is successful, but final apply is not:
All other commands involving the state file, such as
terraform show foo
, also fail.State file
After performing all four steps, the state file is:
This is despite the correct provider being present in the
.terraform
directory as detected from config.The text was updated successfully, but these errors were encountered: