Skip to content

Commit

Permalink
guard against missing ipv6 information
Browse files Browse the repository at this point in the history
breaks if the server is in a stopped state, in which case the
information is not available.

fixes scaleway#42
  • Loading branch information
nicolai86 committed Feb 27, 2018
1 parent 003db97 commit 97b9788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scaleway/resource_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func resourceScalewayServerRead(d *schema.ResourceData, m interface{}) error {
d.Set("private_ip", server.PrivateIP)
d.Set("public_ip", server.PublicAddress.IP)

if server.EnableIPV6 {
if server.EnableIPV6 && server.IPV6 != nil {
d.Set("public_ipv6", server.IPV6.Address)
}

Expand Down

0 comments on commit 97b9788

Please sign in to comment.