Question

refused connection when trying to access digital ocean provider?

Posted March 26, 2021 243 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    "https://api.digitalocean.com/v2/account/keys?page=1&per_page=200": dial tcp: lookup api.digitalocean.com on [::1]:53: read udp [::1]:55759->[::1]:53: read: connection refused

on providers.tf 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 api.digitalocean.com hostname and see where the connections is dropping exactly:

traceroute api.digitalocean.com

Regards,
Bobby