command/show: refresh is required to show remote state (#20818)

This commit is contained in:
Kristin Laemmert 2019-03-25 16:28:35 -04:00 committed by GitHub
parent 4b9a764eb1
commit d5bb09b13b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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