From 041f7a9d27cc0a77a6d69a0baa038cd3eaf5b296 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 10 Dec 2020 10:42:34 -0800 Subject: [PATCH] command/init: Hint about the v0.13 upgrade guide The previous commit introduced a hint for folks who are missing declarations of requirements for non-default providers -- that is, ones in namespaces other than registry.terraform.io/hashicorp/ . For v0.14 in particular one way to get into that situation is to try to skip directly from v0.12 to v0.14 without stopping at v0.13 to run through its upgrade guide, so this adds one further hint to that error message that using the v0.13 upgrade guide could be helpful to resolve the error more easily, rather than manually inserting all of the individual requirements. The messaging in the previous commit will live on in v0.15, but the paragraph in this commit is for v0.14 only as a temporary hint for folks who are upgrading. --- command/init.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/init.go b/command/init.go index 5843820851..f185ef3a39 100644 --- a/command/init.go +++ b/command/init.go @@ -554,7 +554,8 @@ func (c *InitCommand) getProviders(config *configs.Config, state *states.State, diags = diags.Append(tfdiags.Sourceless( tfdiags.Error, "Failed to query available provider packages", - fmt.Sprintf("Could not retrieve the list of available versions for provider %s: %s%s", + fmt.Sprintf( + "Could not retrieve the list of available versions for provider %s: %s\n\nIf you have just upgraded directly from Terraform v0.12 to Terraform v0.14 then please upgrade to Terraform v0.13 first and follow the upgrade guide for that release, which might help you address this problem.%s", provider.ForDisplay(), err, suggestion, ), ))