diff --git a/command/meta_config.go b/command/meta_config.go index ec7b3ec16a..2bb104a11a 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.