providers/digitalocean: only save private ip address if private
This commit is contained in:
parent
2fe6f2e2b1
commit
d9bfe1c2fe
|
@ -287,11 +287,11 @@ func resource_digitalocean_droplet_update_state(
|
||||||
}
|
}
|
||||||
|
|
||||||
s.Attributes["ipv4_address"] = droplet.IPV4Address("public")
|
s.Attributes["ipv4_address"] = droplet.IPV4Address("public")
|
||||||
s.Attributes["ipv4_address_private"] = droplet.IPV4Address("private")
|
|
||||||
s.Attributes["locked"] = droplet.IsLocked()
|
s.Attributes["locked"] = droplet.IsLocked()
|
||||||
|
|
||||||
if droplet.NetworkingType() == "private" {
|
if droplet.NetworkingType() == "private" {
|
||||||
s.Attributes["private_networking"] = "true"
|
s.Attributes["private_networking"] = "true"
|
||||||
|
s.Attributes["ipv4_address_private"] = droplet.IPV4Address("private")
|
||||||
}
|
}
|
||||||
|
|
||||||
s.Attributes["size"] = droplet.SizeSlug()
|
s.Attributes["size"] = droplet.SizeSlug()
|
||||||
|
|
Loading…
Reference in New Issue