Drift is the gap between the real infrastructure and the one described by Terraform, caused by manual changes made outside the tool. A terraform plan (or plan -refresh-only) detects it by comparing reality with the state. You fix it by restoring the configuration or by adopting the change in the code.