diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go index 7720ddc6ccb..2678121d48f 100644 --- a/aws/resource_aws_lb_listener.go +++ b/aws/resource_aws_lb_listener.go @@ -493,6 +493,10 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error return nil }) + if isResourceTimeoutError(err) { + _, err = elbconn.CreateListener(params) + } + if err != nil { return fmt.Errorf("Error creating LB Listener: %s", err) } @@ -526,6 +530,10 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { return nil }) + if isResourceTimeoutError(err) { + _, err = elbconn.DescribeListeners(request) + } + if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { log.Printf("[WARN] ELBv2 Listener (%s) not found - removing from state", d.Id()) d.SetId("") @@ -799,6 +807,11 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error } return nil }) + + if isResourceTimeoutError(err) { + _, err = elbconn.ModifyListener(params) + } + if err != nil { return fmt.Errorf("Error modifying LB Listener: %s", err) }