From 08291afd977f84bb3ed487d26ab3d2bba343ca78 Mon Sep 17 00:00:00 2001 From: David Kelly Date: Mon, 18 Jul 2016 13:14:35 +0100 Subject: [PATCH 1/2] Increased lambda event mapping creation timeout (#7657) Increased the retry timeout from 1 to 5 minutes due to the time for IAM permission propagation --- .../providers/aws/resource_aws_lambda_event_source_mapping.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_lambda_event_source_mapping.go b/builtin/providers/aws/resource_aws_lambda_event_source_mapping.go index 72804ac9d..03072307f 100644 --- a/builtin/providers/aws/resource_aws_lambda_event_source_mapping.go +++ b/builtin/providers/aws/resource_aws_lambda_event_source_mapping.go @@ -98,7 +98,7 @@ func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta inte // // The role may exist, but the permissions may not have propagated, so we // retry - err := resource.Retry(1*time.Minute, func() *resource.RetryError { + err := resource.Retry(5*time.Minute, func() *resource.RetryError { eventSourceMappingConfiguration, err := conn.CreateEventSourceMapping(params) if err != nil { if awserr, ok := err.(awserr.Error); ok { @@ -184,7 +184,7 @@ func resourceAwsLambdaEventSourceMappingUpdate(d *schema.ResourceData, meta inte Enabled: aws.Bool(d.Get("enabled").(bool)), } - err := resource.Retry(1*time.Minute, func() *resource.RetryError { + err := resource.Retry(5*time.Minute, func() *resource.RetryError { _, err := conn.UpdateEventSourceMapping(params) if err != nil { if awserr, ok := err.(awserr.Error); ok { From 8b11bc058189f2b8c419974496e7dac3463f2b4b Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 18 Jul 2016 14:16:15 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f83b1b442..82b26badc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -170,6 +170,7 @@ BUG FIXES: * provider/aws: Fix issue reattaching a VPN gateway to a VPC [GH-6987] * provider/aws: Fix issue with Root Block Devices and encrypted flag in Launch Configurations [GH-6512] * provider/aws: If more ENIs are attached to `aws_instance`, the one w/ DeviceIndex `0` is always used in context of `aws_instance` (previously unpredictable) [GH-6761] + * provider/aws: Increased lambda event mapping creation timeout [GH-7657] * provider/aws: Handle spurious failures in resourceAwsSecurityGroupRuleRead [GH-7377] * provider/aws: Make 'stage_name' required in api_gateway_deployment [GH-6797] * provider/aws: Mark Lambda function as gone when it's gone [GH-6924]