func ImpliedProviderForUnqualifiedType(typeName string) Provider {
	switch typeName {
	case "terraform":
		return NewBuiltInProvider(typeName)
	default:
		return NewDefaultProvider(typeName)
	}
}
ImpliedProviderForUnqualifiedType represents the rules for inferring what
provider FQN a user intended when only a naked type name is available.

For all except the type name "terraform" this returns a so-called "default"
provider, which is under the registry.terraform.io/hashicorp/ namespace.

As a special case, the string "terraform" maps to
"terraform.io/builtin/terraform" because that is the more likely user
intent than the now-unmaintained "registry.terraform.io/hashicorp/terraform"
which remains only for compatibility with older Terraform versions.
package addrs
import (
	"fmt"
	"strings"
	"golang.org/x/net/idna"
	"github.com/camptocamp/terraboard/internal/terraform/tfdiags"
	"github.com/hashicorp/hcl/v2"
	svchost "github.com/hashicorp/terraform-svchost"
)
type Provider struct {
	Type      string
	Namespace string
	Hostname  svchost.Hostname
}
const DefaultRegistryHost = svchost.Hostname("registry.terraform.io")
const BuiltInProviderHost = svchost.Hostname("terraform.io")
const BuiltInProviderNamespace = "builtin"
const LegacyProviderNamespace = "-"
func (pt Provider) String() string {
	if pt.IsZero() {
		panic("called String on zero-value addrs.Provider")
	}
	return pt.Hostname.ForDisplay() + "/" + pt.Namespace + "/" + pt.Type
}
func (pt Provider) ForDisplay() string {
	if pt.IsZero() {
		panic("called ForDisplay on zero-value addrs.Provider")
	}
	if pt.Hostname == DefaultRegistryHost {
		return pt.Namespace + "/" + pt.Type
	}
	return pt.Hostname.ForDisplay() + "/" + pt.Namespace + "/" + pt.Type
}
func NewProvider(hostname svchost.Hostname, namespace, typeName string) Provider {
	if namespace == LegacyProviderNamespace {
		panic("attempt to create legacy provider address using NewProvider; use NewLegacyProvider instead")
	}
	return Provider{
		Type:      MustParseProviderPart(typeName),
		Namespace: MustParseProviderPart(namespace),
		Hostname:  hostname,
	}
}