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.
pull/27262/head
Martin Atkins 6 years ago
parent ba435654eb
commit 041f7a9d27

@ -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,
),
))

Loading…
Cancel
Save