Sometimes your infrastructure may be out of sync with your Terraform state because resources may have been amended or deleted manually.
For this you can
refresh the Terraform state.
terraform refresh [options]
Why this command may appear strange at first, not that it is merely an alias for:
terraform apply -refresh-only -auto-approve
If you don’t want to
auto-approve the transaction, then you can perform a refresh as follows:
If you use a
var-file to specify environment specific configuration, then you can do the following:
auto-approve as follows: