provider/aws: Removal of duplicate error handling code in cloudwatch_log_group

cloudwatch_log_group
This commit is contained in:
Paul Stack 2016-04-28 13:12:47 +01:00
parent a13363fe43
commit a9b738f00c
1 changed files with 4 additions and 6 deletions

View File

@ -117,17 +117,15 @@ func resourceAwsCloudWatchLogGroupUpdate(d *schema.ResourceData, meta interface{
}
log.Printf("[DEBUG] Setting retention for CloudWatch Log Group: %q: %s", name, input)
_, err = conn.PutRetentionPolicy(&input)
if err != nil {
return err
}
} else {
log.Printf("[DEBUG] Deleting retention for CloudWatch Log Group: %q", name)
_, err = conn.DeleteRetentionPolicy(&cloudwatchlogs.DeleteRetentionPolicyInput{
LogGroupName: aws.String(name),
})
if err != nil {
return err
}
}
if err != nil {
return err
}
}