Question

refused connection when trying to access digital ocean provider?

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" {

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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