From 31236b8f9e71dab322f79e31fb8447a6a2c178db Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Wed, 25 Feb 2015 11:05:14 -0600 Subject: [PATCH] Fix zero case --- builtin/providers/aws/resource_aws_db_instance.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index 535797582..bf9a12986 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -201,9 +201,8 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.StorageType = aws.String(attr.(string)) } - if attr, ok := d.GetOk("backup_retention_period"); ok { - opts.BackupRetentionPeriod = aws.Integer(attr.(int)) - } + attr := d.Get("backup_retention_period") + opts.BackupRetentionPeriod = aws.Integer(attr.(int)) if attr, ok := d.GetOk("iops"); ok { opts.IOPS = aws.Integer(attr.(int))