You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using in-house providers (sys provider in my example) with terraform 0.12, the provider gets registered in the tfstate. When using terraform 0.13, the hcl files can be updated to refer to the correct provider source (using the guide), but the tfstate still refers to the legacy provider source.
Given a terraform module which was upgraded to specify a source for the in-house provider sys, I get the following error when running terraform init in 0.13
Actual Behavior
+ terraform init
Initializing modules...
Initializing the backend...
Initializing provider plugins...
- Using previously-installed localhost/local/sys v1.0.0
- Using previously-installed hashicorp/random v2.2.1
- Using previously-installed hashicorp/template v2.1.2
- Using previously-installed -/random v2.2.1
- Using previously-installed -/template v2.1.2
- Finding latest version of -/sys...
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider -/sys: provider
registry registry.terraform.io does not have a provider named
registry.terraform.io/-/sys
Expected Behavior
Specifying the provider in the terraform files should be enough for terraform to understand the provider source in 0.12
Steps to Reproduce
I guess applying a module with in-house provider in 0.12, configure the module to work with 0.13 and run terraform init with 0.13
We're currently iterating on that upgrade guide over in #25113, and there's some extra content in the latest version about the situation you're describing; look for the additional paragraphs at the end of the "In-house Providers" section.
With that said, because this requires changes to state I would not suggest following those instructions unless you are working in a temporary testing environment, because once the state is upgrade to use the new syntax it will no longer be readable by Terraform 0.12.
I just noticed that the existing issue #25346 is reporting the same problem, so I'm going to close this issue to consolidate the discussion over there. Thanks again!
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.
ghost
locked and limited conversation to collaborators
Jul 25, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
v0.13Issues (primarily bugs) reported against v0.13 releases
Terraform Version
Description of the problem
When using in-house providers (
sys
provider in my example) with terraform 0.12, the provider gets registered in the tfstate. When using terraform 0.13, the hcl files can be updated to refer to the correct provider source (using the guide), but the tfstate still refers to the legacy provider source.Given a terraform module which was upgraded to specify a source for the in-house provider
sys
, I get the following error when running terraform init in 0.13Actual Behavior
Expected Behavior
Specifying the provider in the terraform files should be enough for terraform to understand the provider source in 0.12
Steps to Reproduce
I guess applying a module with in-house provider in 0.12, configure the module to work with 0.13 and run terraform init with 0.13
Additional Context
References
The text was updated successfully, but these errors were encountered: