Skip to content

Commit

Permalink
DigitalOcean - droplet always being recreated (#7044)
Browse files Browse the repository at this point in the history
The region returned by the API is always lowercase therefore when you specify a region uppercase in your config file it forces the droplet to be regenerated on every ```terraform apply``` (even when it is not needed).
  • Loading branch information
bchelli authored and stack72 committed Jun 9, 2016
1 parent 7b273bc commit cc22cef
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func resourceDigitalOceanDroplet() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
StateFunc: func(val interface{}) string {
// DO API V2 region slug is always lowercase
return strings.ToLower(val.(string))
},
},

"size": &schema.Schema{
Expand Down

0 comments on commit cc22cef

Please sign in to comment.