diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index 5357975823..bf9a12986c 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))