make display plugin checksum error to user
The error follows a generic message, so can be ignored by users who may not understand the implications.
This commit is contained in:
parent
5be15ed77c
commit
7a955f990c
|
@ -412,20 +412,18 @@ func (b *Local) stateWorkspaceDir() string {
|
|||
func (b *Local) pluginInitRequired(providerErr *terraform.ResourceProviderError) {
|
||||
b.CLI.Output(b.Colorize().Color(fmt.Sprintf(
|
||||
strings.TrimSpace(errPluginInit)+"\n",
|
||||
"Could not satisfy plugin requirements",
|
||||
providerErr)))
|
||||
}
|
||||
|
||||
// this relies on multierror to format the plugin errors below the copy
|
||||
const errPluginInit = `
|
||||
[reset][bold][yellow]Plugin reinitialization required. Please run "terraform init".[reset]
|
||||
[yellow]Reason: %s
|
||||
[yellow]Reason: Could not satisfy plugin requirements.
|
||||
|
||||
Plugins are external binaries that Terraform uses to access and manipulate
|
||||
resources. If this message is showing up, it means that the configuration you
|
||||
have references plugins which can't be located, don't satisfy the version
|
||||
constraints, or are otherwise incompatible.
|
||||
|
||||
The errors encountered discovering plugins are:
|
||||
|
||||
%s
|
||||
[reset][red]%s
|
||||
`
|
||||
|
|
|
@ -53,12 +53,7 @@ func (r *multiVersionProviderResolver) ResolveProviders(
|
|||
continue
|
||||
}
|
||||
if !reqd[name].AcceptsSHA256(digest) {
|
||||
// This generic error message is intended to avoid troubling
|
||||
// users with implementation details. The main useful point
|
||||
// here is that they need to run "terraform init" to
|
||||
// fix this, which is covered by the UI code reporting these
|
||||
// error messages.
|
||||
errs = append(errs, fmt.Errorf("provider.%s: installed but not yet initialized", name))
|
||||
errs = append(errs, fmt.Errorf("provider.%s: checksum mismatch", name))
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue