From 74b7137cdc5442d74a9fa459247f07d6257f8c79 Mon Sep 17 00:00:00 2001 From: Jack Pearkes Date: Thu, 26 Feb 2015 09:37:05 -0800 Subject: [PATCH] providers/digitalocean: use real bools for droplet creation Fixes #792 Depends on https://github.com/pearkes/digitalocean/pull/5 --- .../digitalocean/resource_digitalocean_droplet.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/providers/digitalocean/resource_digitalocean_droplet.go b/builtin/providers/digitalocean/resource_digitalocean_droplet.go index ac929d238..91277301f 100644 --- a/builtin/providers/digitalocean/resource_digitalocean_droplet.go +++ b/builtin/providers/digitalocean/resource_digitalocean_droplet.go @@ -52,7 +52,7 @@ func resourceDigitalOceanDroplet() *schema.Resource { }, "backups": &schema.Schema{ - Type: schema.TypeString, + Type: schema.TypeBool, Optional: true, }, @@ -112,15 +112,15 @@ func resourceDigitalOceanDropletCreate(d *schema.ResourceData, meta interface{}) } if attr, ok := d.GetOk("backups"); ok { - opts.Backups = attr.(string) + opts.Backups = attr.(bool) } - if attr, ok := d.GetOk("ipv6"); ok && attr.(bool) { - opts.IPV6 = "true" + if attr, ok := d.GetOk("ipv6"); ok { + opts.IPV6 = attr.(bool) } - if attr, ok := d.GetOk("private_networking"); ok && attr.(bool) { - opts.PrivateNetworking = "true" + if attr, ok := d.GetOk("private_networking"); ok { + opts.PrivateNetworking = attr.(bool) } if attr, ok := d.GetOk("user_data"); ok {