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, Type: schema.TypeString,
Computed: true, Computed: true,
}, },
"public_ipv6": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"state": &schema.Schema{ "state": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
@ -194,6 +198,10 @@ func resourceScalewayServerRead(d *schema.ResourceData, m interface{}) error {
d.Set("private_ip", server.PrivateIP) d.Set("private_ip", server.PrivateIP)
d.Set("public_ip", server.PublicAddress.IP) 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", server.State)
d.Set("state_detail", server.StateDetail) d.Set("state_detail", server.StateDetail)
d.Set("tags", server.Tags) d.Set("tags", server.Tags)