Merge pull request #16882 from Techcadia/f-provider-logging

[Add] Pathing and Override to DEBUG Command
This commit is contained in:
James Bardin 2018-01-05 12:25:24 -05:00 committed by GitHub
commit 6367572455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -209,13 +209,16 @@ func (m *Meta) providerPluginSet() discovery.PluginMetaSet {
// Add providers defined in the legacy .terraformrc, // Add providers defined in the legacy .terraformrc,
if m.PluginOverrides != nil { if m.PluginOverrides != nil {
for k, v := range m.PluginOverrides.Providers {
log.Printf("[DEBUG] found plugin override in .terraformrc: %q, %q", k, v)
}
plugins = plugins.OverridePaths(m.PluginOverrides.Providers) plugins = plugins.OverridePaths(m.PluginOverrides.Providers)
} }
plugins, _ = plugins.ValidateVersions() plugins, _ = plugins.ValidateVersions()
for p := range plugins { for p := range plugins {
log.Printf("[DEBUG] found valid plugin: %q", p.Name) log.Printf("[DEBUG] found valid plugin: %q, %q, %q", p.Name, p.Version, p.Path)
} }
return plugins return plugins
@ -241,13 +244,17 @@ func (m *Meta) providerPluginManuallyInstalledSet() discovery.PluginMetaSet {
// Add providers defined in the legacy .terraformrc, // Add providers defined in the legacy .terraformrc,
if m.PluginOverrides != nil { if m.PluginOverrides != nil {
for k, v := range m.PluginOverrides.Providers {
log.Printf("[DEBUG] found plugin override in .terraformrc: %q, %q", k, v)
}
plugins = plugins.OverridePaths(m.PluginOverrides.Providers) plugins = plugins.OverridePaths(m.PluginOverrides.Providers)
} }
plugins, _ = plugins.ValidateVersions() plugins, _ = plugins.ValidateVersions()
for p := range plugins { for p := range plugins {
log.Printf("[DEBUG] found valid plugin: %q", p.Name) log.Printf("[DEBUG] found valid plugin: %q, %q, %q", p.Name, p.Version, p.Path)
} }
return plugins return plugins