Merge pull request #11829 from hashicorp/b-aws-test-fixes

provider/aws: Set the qualifier to an empty string if the parsing fai…
This commit is contained in:
Clint 2017-02-09 15:17:25 -06:00 committed by GitHub
commit b1a70b5560
1 changed files with 3 additions and 2 deletions

View File

@ -211,9 +211,10 @@ func resourceAwsLambdaPermissionRead(d *schema.ResourceData, meta interface{}) e
}
qualifier, err := getQualifierFromLambdaAliasOrVersionArn(statement.Resource)
if err == nil {
d.Set("qualifier", qualifier)
if err != nil {
log.Printf("[ERR] Error getting Lambda Qualifier: %s", err)
}
d.Set("qualifier", qualifier)
// Save Lambda function name in the same format
if strings.HasPrefix(d.Get("function_name").(string), "arn:"+meta.(*AWSClient).partition+":lambda:") {