Fix aws_lambda_function attributes when more than 50 versions (#11745)

Fixes the version and qualified_arn attributes, when the lambda
function has more than 50 versions.

Closes #11720
This commit is contained in:
Hugo Duncan 2017-03-15 14:51:43 -04:00 committed by Paul Stack
parent c66c78cce7
commit 0d4e6e8cf0
1 changed files with 3 additions and 2 deletions

View File

@ -389,9 +389,9 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err
last := p.Versions[len(p.Versions)-1]
lastVersion = *last.Version
lastQualifiedArn = *last.FunctionArn
return true
return false
}
return false
return true
})
if err != nil {
return err
@ -416,6 +416,7 @@ func listVersionsByFunctionPages(c *lambda.Lambda, input *lambda.ListVersionsByF
if !shouldContinue || lastPage {
break
}
input.Marker = page.NextMarker
}
return nil
}