Problem
When running Terraform commands on an Apple MacBook Pro with an Intel, M1, or M2 chip, you may experience significant performance degradation. Symptoms include terraform runs hanging, timing out, or other network-dependent applications freezing.
Cause
This issue can occur on macOS environments where the network configuration includes an IPv6 name server with a link-local address (e.g., fe80::*). Terraform, via the underlying Go runtime, may attempt to resolve hosts using IPv6, leading to connection delays or failures.
Solutions
Solution 1: Disable IPv6
To resolve this issue, disable IPv6 in your macOS system settings and then reboot your machine to restore network connectivity.
Additional Information
- The Terraform Core engineering team is tracking this behavior in GitHub issue #31467.
- The behavior is related to an upstream issue in the Go programming language, tracked in golang/go issue #52839.