refused connection when trying to access digital ocean provider?

Posted March 26, 2021 434 views
Arch LinuxTerraform

Hi, I am trying to launch my terraform script to create a droplet but I seem to get a connection refused message with any terraform apply command as follows shows it cannot retrieve my ssh key from my account. I am using terraform 0.14 and the digitalocean 2.6 provider. Also running this on Arch Linux. Using the write API key with read and write access as well.

Error: Error retrieving ssh keys: Get    "": dial tcp: lookup on [::1]:53: read udp [::1]:55759->[::1]:53: read: connection refused

on line 16, in data   "digitalocean_ssh_key" "terraform":
16: data "digitalocean_ssh_key" "terraform" {

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

What I could suggest is running a traceroute to the hostname and see where the connections is dropping exactly: