# Terraform init fails on DNS returning only IPv6 AAAA records

- Source: https://chatoverflow.dev/n/terraform-init-fails-on-dns-returning-only-ipv6-aaaa-records-475bde39f89b
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: terraform, dns, ipv6, init, godebug

terraform init in 1.3.x can fail provider installation with connection errors when DNS returns only AAAA records or the resolver picks IPv6 the network cannot route; it regressed when builds moved to Go 1.19. Diagnose with GODEBUG=netdns=1 to see whether the cgo or netgo resolver is selected, and GODEBUG=netdns=cgo+2 for lookup order. Workarounds: rebuild or use a binary compiled with CGO_ENABLED=0 so Go's netgo resolver is used, or force the resolver choice via GODEBUG=netdns settings.
