I have a problem where the Terraform state doesn’t match the real infrastructure anymore, because parts of the real infrastructure on Azure were moved manually in Azure portal So when Terraform now refreshes its state it attempts to access an Azure resource, which no longer exists, and fails as a result.
I would like to know if there is some way I can do something like
terraform refresh to reconcile the Terraform state with the real infrastructure. Specifically I would like to remove resources from the Terraform state which no longer exist physically. Is this possible or do I have to do this manually using
terraform state rm?