DigitalOcean - droplet always being recreated (#7044)
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).
This commit is contained in:
parent
7b273bcd01
commit
cc22cef085
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue