provider/aws: Refreshing the state when DBParameterGroupNotFound

happens
This commit is contained in:
stack72 2016-05-18 14:10:32 +01:00
parent fdf1962905
commit 21a65fd085

View File

@ -111,6 +111,12 @@ func resourceAwsRDSClusterParameterGroupRead(d *schema.ResourceData, meta interf
describeResp, err := rdsconn.DescribeDBClusterParameterGroups(&describeOpts)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "DBParameterGroupNotFound" {
log.Printf("[WARN] DB Cluster Parameter Group (%s) not found, error code (404)", d.Id())
d.SetId("")
return nil
}
return err
}