Skip to content

Commit

Permalink
Enforcing lowercase on the DO Size. This is used for the sizeslug pro…
Browse files Browse the repository at this point in the history
…perty 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
  • Loading branch information
stack72 committed Sep 18, 2015
1 parent a7a7f83 commit 9ac39a3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func resourceDigitalOceanDroplet() *schema.Resource {
"size": &schema.Schema{
Type: schema.TypeString,
Required: true,
StateFunc: func(val interface{}) string {
// DO API V2 size slug is always lowercase
return strings.ToLower(val.(string))
},
},

"status": &schema.Schema{
Expand Down

0 comments on commit 9ac39a3

Please sign in to comment.