mirror of
https://github.com/hashicorp/terraform.git
synced 2026-05-28 04:03:27 -04:00
command/show: refresh is required to show remote state (#20818)
This commit is contained in:
parent
4b9a764eb1
commit
d5bb09b13b
1 changed files with 4 additions and 0 deletions
|
|
@ -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 a new issue