From fd98cae9ccbfe5be9c2b371eb252519c7100a151 Mon Sep 17 00:00:00 2001 From: John Ewart Date: Wed, 24 Jun 2015 07:36:14 -0700 Subject: [PATCH] Increment attemptCount when a LimitExceededException occurs --- builtin/providers/aws/resource_aws_dynamodb_table.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_dynamodb_table.go b/builtin/providers/aws/resource_aws_dynamodb_table.go index b4ca3810e..5266c64c7 100644 --- a/builtin/providers/aws/resource_aws_dynamodb_table.go +++ b/builtin/providers/aws/resource_aws_dynamodb_table.go @@ -269,8 +269,9 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er time.Sleep(DYNAMODB_THROTTLE_SLEEP) attemptCount += 1 } else if awsErr.Code() == "LimitExceededException" { - log.Printf("[DEBUG] Limit on creation hit, sleeping for a bit") + log.Printf("[DEBUG] Limit on concurrent table creations hit, sleeping for a bit") time.Sleep(DYNAMODB_LIMIT_EXCEEDED_SLEEP) + attemptCount += 1 } else { // Some other non-retryable exception occurred return fmt.Errorf("AWS Error creating DynamoDB table: %s", err)