From d9bfe1c2fe607f1b9feaf214425a9ccf43a88045 Mon Sep 17 00:00:00 2001 From: Jack Pearkes Date: Fri, 1 Aug 2014 10:12:29 -0400 Subject: [PATCH] providers/digitalocean: only save private ip address if private --- builtin/providers/digitalocean/resource_digitalocean_droplet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/digitalocean/resource_digitalocean_droplet.go b/builtin/providers/digitalocean/resource_digitalocean_droplet.go index 49e47817c..264ded329 100644 --- a/builtin/providers/digitalocean/resource_digitalocean_droplet.go +++ b/builtin/providers/digitalocean/resource_digitalocean_droplet.go @@ -287,11 +287,11 @@ func resource_digitalocean_droplet_update_state( } s.Attributes["ipv4_address"] = droplet.IPV4Address("public") - s.Attributes["ipv4_address_private"] = droplet.IPV4Address("private") s.Attributes["locked"] = droplet.IsLocked() if droplet.NetworkingType() == "private" { s.Attributes["private_networking"] = "true" + s.Attributes["ipv4_address_private"] = droplet.IPV4Address("private") } s.Attributes["size"] = droplet.SizeSlug()