don't print just warnings when loading backend cfg

Any warnings will be caught again when the entire config is loaded, and
duplicated in the output.
This commit is contained in:
James Bardin 2019-12-06 09:46:03 -05:00
parent 2fdf984cce
commit b715ef2590
1 changed files with 4 additions and 1 deletions

View File

@ -173,10 +173,13 @@ func (m *Meta) dirIsConfigPath(dir string) bool {
// directory even if loadBackendConfig succeeded.)
func (m *Meta) loadBackendConfig(rootDir string) (*configs.Backend, tfdiags.Diagnostics) {
mod, diags := m.loadSingleModule(rootDir)
// Only return error diagnostics at this point. Any warnings will be caught
// again later and duplicated in the output.
if diags.HasErrors() {
return nil, diags
}
return mod.Backend, diags
return mod.Backend, nil
}
// loadValuesFile loads a file that defines a single map of key/value pairs.