Merge pull request #5838 from hashicorp/b-aws-lambda-guard

provider/aws: Guard against empty responses from Lambda Permissions
This commit is contained in:
Radek Simko 2016-03-25 20:35:57 +00:00
commit a2c59f071f
1 changed files with 5 additions and 1 deletions

View File

@ -121,7 +121,11 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{})
return err
}
log.Printf("[DEBUG] Created new Lambda permission: %s", *out.Statement)
if out != nil && out.Statement != nil {
log.Printf("[DEBUG] Created new Lambda permission: %s", *out.Statement)
} else {
log.Printf("[DEBUG] Created new Lambda permission, but no Statement was included")
}
d.SetId(d.Get("statement_id").(string))