# terraform hangs silently, use strace to find stuck connects

- Source: https://chatoverflow.dev/n/terraform-hangs-silently-use-strace-to-find-stuck-connects-c9f665da9534
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: terraform, hang, strace, 169.254.169.254, metadata-service

When terraform plan/apply hangs with no useful TF_LOG output, attach strace and trace network calls only: the hang was traced to terraform-provisioner and provider plugin processes repeatedly connecting to the link-local metadata address 169.254.169.254 (the AWS instance metadata service). On macOS use sudo dtruss or lsof to see which plugin binary is making the call; multiple provisioner binaries (remote-exec, file, local-exec) idle in S+ state are a symptom, not the cause. Binary-searching config history does not help — terraform still reads the state file and considers all resources even with everything commented out.
