mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-08 15:13:56 -06:00
8d28d73de3
provider is not found. Previously a user would see the following error even if terraform was only searching the local filesystem: "provider registry registry.terraform.io does not have a provider named ...." This PR adds a registry-specific error type and modifies the MultiSource installer to check for registry errors. It will return the registry-specific error message if there is one, but if not the error message will list all locations searched.
14 lines
410 B
Go
14 lines
410 B
Go
package getproviders
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform/addrs"
|
|
)
|
|
|
|
// A Source can query a particular source for information about providers
|
|
// that are available to install.
|
|
type Source interface {
|
|
AvailableVersions(provider addrs.Provider) (VersionList, error)
|
|
PackageMeta(provider addrs.Provider, version Version, target Platform) (PackageMeta, error)
|
|
ForDisplay(provider addrs.Provider) string
|
|
}
|