diff --git a/internal/getproviders/registry_client.go b/internal/getproviders/registry_client.go index 6b5be18c02..a1d1532d71 100644 --- a/internal/getproviders/registry_client.go +++ b/internal/getproviders/registry_client.go @@ -211,6 +211,8 @@ func (c *registryClient) PackageMeta(provider addrs.Provider, version Version, t } ret := PackageMeta{ + Provider: provider, + Version: version, ProtocolVersions: protoVersions, TargetPlatform: Platform{ OS: body.OS, diff --git a/internal/getproviders/registry_source_test.go b/internal/getproviders/registry_source_test.go index 0d5efab488..5de161e7b1 100644 --- a/internal/getproviders/registry_source_test.go +++ b/internal/getproviders/registry_source_test.go @@ -117,6 +117,10 @@ func TestSourcePackageMeta(t *testing.T) { "1.2.0", "linux", "amd64", PackageMeta{ + Provider: addrs.NewProvider( + svchost.Hostname("example.com"), "awesomesauce", "happycloud", + ), + Version: versions.MustParseVersion("1.2.0"), ProtocolVersions: VersionList{versions.MustParseVersion("5.0.0")}, TargetPlatform: Platform{"linux", "amd64"}, Filename: "happycloud_1.2.0.zip", diff --git a/internal/getproviders/types.go b/internal/getproviders/types.go index 3cfce0c125..83515173b1 100644 --- a/internal/getproviders/types.go +++ b/internal/getproviders/types.go @@ -48,6 +48,9 @@ var CurrentPlatform = Platform{ // accepted by the current version of Terraform before trying to use the // described package. type PackageMeta struct { + Provider addrs.Provider + Version Version + ProtocolVersions VersionList TargetPlatform Platform