mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -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)
|
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)
|
sf := statemgr.Export(stateStore)
|
||||||
|
|
||||||
return sf, nil
|
return sf, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user