Mongey/terraform-provider-kafka

DNS Resolution Failures on MacOS

cablespaghetti opened this issue · 1 comments

Similarly to this issue Telmate/terraform-provider-proxmox#665 I am seeing DNS resolution failures when connected to a VPN using split DNS on the latest version of MacOS. This seems to be a oddity in the way Go does DNS resolution when MacOS releases are cross-compiled from Linux or another OS.

The error looks something like this:

╷
│ Error: kafka: client has run out of available brokers to talk to: 3 errors occurred:
│ 	* dial tcp: lookup b-1.engineering-staging-ev.evlm5o.c1.kafka.eu-west-1.amazonaws.com on [2a00:23c6:d098:4200:62be:b4ff:fe06:1372]:53: no such host
│ 	* dial tcp: lookup b-2.engineering-staging-ev.evlm5o.c1.kafka.eu-west-1.amazonaws.com on [2a00:23c6:d098:4200:62be:b4ff:fe06:1372]:53: no such host
│ 	* dial tcp: lookup b-3.engineering-staging-ev.evlm5o.c1.kafka.eu-west-1.amazonaws.com on [2a00:23c6:d098:4200:62be:b4ff:fe06:1372]:53: no such host
│
│
│   with module.engineering-staging-event-system-acl.kafka_acl.cluster_admin,
│   on ../../modules/event-system-acl/main.tf line 21, in resource "kafka_acl" "cluster_admin":
│   21: resource "kafka_acl" "cluster_admin" {
│
╵

However doing DNS resolution the "proper way" on MacOS gets an IP address:

❯ dscacheutil -q host -a name b-3.engineering-staging-ev.evlm5o.c1.kafka.eu-west-1.amazonaws.com
name: b-3.engineering-staging-ev.evlm5o.c1.kafka.eu-west-1.amazonaws.com
ip_address: 172.27.59.29

Other software also succeeds in connecting.

This should be fixed if this provider can upgrade to Go 1.20: https://danp.net/posts/macos-dns-change-in-go-1-20/

Sorry for the delayed reply but thanks! This is fixed for me :)