provider/aws: Removal of duplicate error handling code in cloudwatch_log_group
cloudwatch_log_group
This commit is contained in:
parent
a13363fe43
commit
a9b738f00c
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue