mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-27 09:21:14 -06:00
command/show: refresh is required to show remote state (#20818)
This commit is contained in:
parent
4b9a764eb1
commit
d5bb09b13b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user