Enforcing lowercase on the DO Size. This is used for the sizeslug property of API calls - according to their [docs](https://developers.digitalocean.com/documentation/v1/sizes/) this always looks to be lowercase on the slug. I cannot find any definite answer to this question though
This commit is contained in:
parent
a7a7f8393e
commit
9ac39a3edf
|
@ -39,6 +39,10 @@ func resourceDigitalOceanDroplet() *schema.Resource {
|
||||||
"size": &schema.Schema{
|
"size": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Required: true,
|
Required: true,
|
||||||
|
StateFunc: func(val interface{}) string {
|
||||||
|
// DO API V2 size slug is always lowercase
|
||||||
|
return strings.ToLower(val.(string))
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
"status": &schema.Schema{
|
"status": &schema.Schema{
|
||||||
|
|
Loading…
Reference in New Issue