Added schema to expose public IPv6 (#12748)
This commit is contained in:
parent
defc629e60
commit
c133143bb2
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue