diff --git a/builtin/providers/digitalocean/resource_digitalocean_droplet.go b/builtin/providers/digitalocean/resource_digitalocean_droplet.go index 712f94a82..9c1965669 100644 --- a/builtin/providers/digitalocean/resource_digitalocean_droplet.go +++ b/builtin/providers/digitalocean/resource_digitalocean_droplet.go @@ -296,7 +296,7 @@ func resource_digitalocean_droplet_update_state( s.Attributes["ipv4_address_private"] = droplet.IPV4Address("private") } - s.Attributes["size"] = droplet.SizeSlug() + s.Attributes["size"] = droplet.SizeSlug s.Attributes["status"] = droplet.Status return s, nil diff --git a/builtin/providers/digitalocean/resource_digitalocean_droplet_test.go b/builtin/providers/digitalocean/resource_digitalocean_droplet_test.go index 12d8a362e..6666576dd 100644 --- a/builtin/providers/digitalocean/resource_digitalocean_droplet_test.go +++ b/builtin/providers/digitalocean/resource_digitalocean_droplet_test.go @@ -123,8 +123,8 @@ func testAccCheckDigitalOceanDropletAttributes(droplet *digitalocean.Droplet) re return fmt.Errorf("Bad image_slug: %s", droplet.ImageSlug()) } - if droplet.SizeSlug() != "512mb" { - return fmt.Errorf("Bad size_slug: %s", droplet.SizeSlug()) + if droplet.SizeSlug != "512mb" { + return fmt.Errorf("Bad size_slug: %s", droplet.SizeSlug) } if droplet.RegionSlug() != "nyc3" { @@ -141,8 +141,8 @@ func testAccCheckDigitalOceanDropletAttributes(droplet *digitalocean.Droplet) re func testAccCheckDigitalOceanDropletRenamedAndResized(droplet *digitalocean.Droplet) resource.TestCheckFunc { return func(s *terraform.State) error { - if droplet.SizeSlug() != "1gb" { - return fmt.Errorf("Bad size_slug: %s", droplet.SizeSlug()) + if droplet.SizeSlug != "1gb" { + return fmt.Errorf("Bad size_slug: %s", droplet.SizeSlug) } if droplet.Name != "baz" { @@ -160,8 +160,8 @@ func testAccCheckDigitalOceanDropletAttributes_PrivateNetworkingIpv6(droplet *di return fmt.Errorf("Bad image_slug: %s", droplet.ImageSlug()) } - if droplet.SizeSlug() != "1gb" { - return fmt.Errorf("Bad size_slug: %s", droplet.SizeSlug()) + if droplet.SizeSlug != "1gb" { + return fmt.Errorf("Bad size_slug: %s", droplet.SizeSlug) } if droplet.RegionSlug() != "sgp1" {