load Meta.PluginOverrides in dicovery
Make sure the override paths from the legacy rc file are loaded for discovery.
This commit is contained in:
parent
fa20d43d80
commit
54998933f5
|
@ -172,6 +172,12 @@ func (m *Meta) pluginDirs(includeAutoInstalled bool) []string {
|
||||||
// the defined search paths.
|
// the defined search paths.
|
||||||
func (m *Meta) providerPluginSet() discovery.PluginMetaSet {
|
func (m *Meta) providerPluginSet() discovery.PluginMetaSet {
|
||||||
plugins := discovery.FindPlugins("provider", m.pluginDirs(true))
|
plugins := discovery.FindPlugins("provider", m.pluginDirs(true))
|
||||||
|
|
||||||
|
// Add providers defined in the legacy .terraformrc,
|
||||||
|
if m.PluginOverrides != nil {
|
||||||
|
plugins = plugins.OverridePaths(m.PluginOverrides.Providers)
|
||||||
|
}
|
||||||
|
|
||||||
plugins, _ = plugins.ValidateVersions()
|
plugins, _ = plugins.ValidateVersions()
|
||||||
|
|
||||||
for p := range plugins {
|
for p := range plugins {
|
||||||
|
@ -198,6 +204,12 @@ func (m *Meta) providerPluginAutoInstalledSet() discovery.PluginMetaSet {
|
||||||
// in all locations *except* the auto-install directory.
|
// in all locations *except* the auto-install directory.
|
||||||
func (m *Meta) providerPluginManuallyInstalledSet() discovery.PluginMetaSet {
|
func (m *Meta) providerPluginManuallyInstalledSet() discovery.PluginMetaSet {
|
||||||
plugins := discovery.FindPlugins("provider", m.pluginDirs(false))
|
plugins := discovery.FindPlugins("provider", m.pluginDirs(false))
|
||||||
|
|
||||||
|
// Add providers defined in the legacy .terraformrc,
|
||||||
|
if m.PluginOverrides != nil {
|
||||||
|
plugins = plugins.OverridePaths(m.PluginOverrides.Providers)
|
||||||
|
}
|
||||||
|
|
||||||
plugins, _ = plugins.ValidateVersions()
|
plugins, _ = plugins.ValidateVersions()
|
||||||
|
|
||||||
for p := range plugins {
|
for p := range plugins {
|
||||||
|
|
Loading…
Reference in New Issue