From d5bb09b13b661a660fc5bfa8bd92fedd2f4da6c1 Mon Sep 17 00:00:00 2001 From: Kristin Laemmert Date: Mon, 25 Mar 2019 16:28:35 -0400 Subject: [PATCH] command/show: refresh is required to show remote state (#20818) --- command/show.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/show.go b/command/show.go index b43a4a1c1..54224aaec 100644 --- a/command/show.go +++ b/command/show.go @@ -263,6 +263,10 @@ func getStateFromEnv(b backend.Backend, env string) (*statefile.File, error) { return nil, fmt.Errorf("Failed to load state manager: %s", err) } + if err := stateStore.RefreshState(); err != nil { + return nil, fmt.Errorf("Failed to load state: %s", err) + } + sf := statemgr.Export(stateStore) return sf, nil