diff --git a/digitalocean/database/resource_database_redis_config.go b/digitalocean/database/resource_database_redis_config.go index 72749c12a..584ed4d98 100644 --- a/digitalocean/database/resource_database_redis_config.go +++ b/digitalocean/database/resource_database_redis_config.go @@ -169,7 +169,7 @@ func updateRedisConfig(ctx context.Context, d *schema.ResourceData, client *godo opts.RedisSSL = godo.PtrTo(v.(bool)) } - if v, ok := d.GetOk("timeout"); ok { + if v, ok := d.GetOkExists("timeout"); ok { opts.RedisTimeout = godo.PtrTo(v.(int)) } diff --git a/digitalocean/database/resource_database_redis_config_test.go b/digitalocean/database/resource_database_redis_config_test.go index 2cc7ad980..5b7185420 100644 --- a/digitalocean/database/resource_database_redis_config_test.go +++ b/digitalocean/database/resource_database_redis_config_test.go @@ -33,12 +33,12 @@ func TestAccDigitalOceanDatabaseRedisConfig_Basic(t *testing.T) { ), }, { - Config: fmt.Sprintf(testAccCheckDigitalOceanDatabaseRedisConfigConfigBasic, dbConfig, "allkeys-lru", 600, "KEA"), + Config: fmt.Sprintf(testAccCheckDigitalOceanDatabaseRedisConfigConfigBasic, dbConfig, "allkeys-lru", 0, "KEA"), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr( "digitalocean_database_redis_config.foobar", "maxmemory_policy", "allkeys-lru"), resource.TestCheckResourceAttr( - "digitalocean_database_redis_config.foobar", "timeout", "600"), + "digitalocean_database_redis_config.foobar", "timeout", "0"), resource.TestCheckResourceAttr( "digitalocean_database_redis_config.foobar", "notify_keyspace_events", "KEA"), resource.TestCheckResourceAttr(