Report this

What is the reason for this report?

Droplets created by Terraform cannot ping each other

Posted on December 17, 2019

Terraform

resource "digitalocean_droplet" "api" {
  image              = "ubuntu-18-04-x64"
  name               = "api"
  region             = "SGP1"
  size               = "s-2vcpu-2gb"
  count              = 2
  private_networking = true
  tags               = ["api", "www"]
  ssh_keys           = module.root_ssh.root_ssh_ids
}

When I try root@api_1$ ping api_2 there’s no packet returned. I had cloud firewall but not enable it for these droplets and ufw status result inactive



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!

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.

Hi :) Certainly feels like a firewall issue - is it possible that you have assigned one of those tags to the cloud firewall? If that is the case, any new droplets with that tag will be auto-added to the firewall.

If that’s not the case, are you trying to ping on the private networking IP or the public?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.