Terraform автоматически обновит состояние перед выполнением команды, которая будет на него полагаться (например, plan
, apply
, destroy
).
Вы можете увидеть это самостоятельно, посмотрев на выводот выполнения этих команд:
$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
data.aws_region.current: Refreshing state...
------------------------------------------------------------------------
No changes. Infrastructure is up-to-date.
This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.