Added schema to expose public IPv6 (#12748)

This commit is contained in:
Willem van Vliet 2017-03-16 20:00:30 +01:00 committed by Paul Stack
parent defc629e60
commit c133143bb2
1 changed files with 8 additions and 0 deletions

View File

@ -88,6 +88,10 @@ func resourceScalewayServer() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"public_ipv6": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"state": &schema.Schema{
Type: schema.TypeString,
Optional: true,
@ -194,6 +198,10 @@ func resourceScalewayServerRead(d *schema.ResourceData, m interface{}) error {
d.Set("private_ip", server.PrivateIP)
d.Set("public_ip", server.PublicAddress.IP)
if server.EnableIPV6 {
d.Set("public_ipv6", server.IPV6.Address)
}
d.Set("state", server.State)
d.Set("state_detail", server.StateDetail)
d.Set("tags", server.Tags)