Merge pull request #5838 from hashicorp/b-aws-lambda-guard
provider/aws: Guard against empty responses from Lambda Permissions
This commit is contained in:
commit
a2c59f071f
|
@ -121,7 +121,11 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if out != nil && out.Statement != nil {
|
||||||
log.Printf("[DEBUG] Created new Lambda permission: %s", *out.Statement)
|
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))
|
d.SetId(d.Get("statement_id").(string))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue