If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
If you have manually destroyed infrastructure, the best practice is to manually update the state file. This allows Terraform to accurately reflect the current state of your infrastructure. Removing a resource definition or running commands like 'terraform apply -refresh-only' or 'terraform import' are not appropriate in this context because they either attempt to reconcile desired state with reality or import existing resources, but do not directly address the discrepancy caused by manual deletion.
B. Remove the resource definition from your file and run terraform apply -refresh-only
B. Remove the resource definition from your file and run terraform apply -refresh-only C