From b715ef2590fe0ad2fda2622f67f52a9c13231e7b Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 6 Dec 2019 09:46:03 -0500 Subject: [PATCH] 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. --- command/meta_config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/command/meta_config.go b/command/meta_config.go index ec7b3ec16..2bb104a11 100644 --- a/command/meta_config.go +++ b/command/meta_config.go @@ -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.