From b5bbf8d7d4ea7a087f8d4d12cdc9025434f508a8 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 10 Aug 2018 09:13:55 -0400 Subject: [PATCH 1/2] resource/aws_cloudtrail: Increase IAM retry threshold from 15 seconds to 1 minute --- aws/resource_aws_cloudtrail.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_cloudtrail.go b/aws/resource_aws_cloudtrail.go index ded9e0be917..934e393d912 100644 --- a/aws/resource_aws_cloudtrail.go +++ b/aws/resource_aws_cloudtrail.go @@ -165,7 +165,7 @@ func resourceAwsCloudTrailCreate(d *schema.ResourceData, meta interface{}) error } var t *cloudtrail.CreateTrailOutput - err := resource.Retry(15*time.Second, func() *resource.RetryError { + err := resource.Retry(1*time.Minute, func() *resource.RetryError { var err error t, err = conn.CreateTrail(&input) if err != nil { From f7ddf9582245b8558b54ea53bf8ed906d9a2fd12 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 10 Aug 2018 09:26:24 -0400 Subject: [PATCH 2/2] resource/aws_cloudtrail: Allow 1 minute IAM retry threshold on update as well --- aws/resource_aws_cloudtrail.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_cloudtrail.go b/aws/resource_aws_cloudtrail.go index 934e393d912..8c6a1ee4260 100644 --- a/aws/resource_aws_cloudtrail.go +++ b/aws/resource_aws_cloudtrail.go @@ -332,7 +332,7 @@ func resourceAwsCloudTrailUpdate(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG] Updating CloudTrail: %s", input) var t *cloudtrail.UpdateTrailOutput - err := resource.Retry(30*time.Second, func() *resource.RetryError { + err := resource.Retry(1*time.Minute, func() *resource.RetryError { var err error t, err = conn.UpdateTrail(&input) if err != nil {