Skip to content

Commit

Permalink
Merge pull request #8984 from terraform-providers/rfd-retry-kinesis
Browse files Browse the repository at this point in the history
Final retries for kinesis applications
  • Loading branch information
bflad authored Jun 13, 2019
2 parents 1c1cb30 + 0965e46 commit cab6db1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions aws/resource_aws_kinesis_analytics_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,13 @@ func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta i
d.SetId(aws.StringValue(output.ApplicationSummary.ApplicationARN))
return nil
})

if isResourceTimeoutError(err) {
var output *kinesisanalytics.CreateApplicationOutput
output, err = conn.CreateApplication(createOpts)
d.SetId(aws.StringValue(output.ApplicationSummary.ApplicationARN))
}

if err != nil {
return fmt.Errorf("Unable to create Kinesis Analytics application: %s", err)
}
Expand Down Expand Up @@ -722,6 +729,10 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i
}
return nil
})
if isResourceTimeoutError(err) {
_, err = conn.AddApplicationCloudWatchLoggingOption(addOpts)
}

if err != nil {
return fmt.Errorf("Unable to add CloudWatch logging options: %s", err)
}
Expand Down Expand Up @@ -754,6 +765,10 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i
}
return nil
})
if isResourceTimeoutError(err) {
_, err = conn.AddApplicationInput(addOpts)
}

if err != nil {
return fmt.Errorf("Unable to add application inputs: %s", err)
}
Expand Down Expand Up @@ -786,6 +801,9 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i
}
return nil
})
if isResourceTimeoutError(err) {
_, err = conn.AddApplicationOutput(addOpts)
}
if err != nil {
return fmt.Errorf("Unable to add application outputs: %s", err)
}
Expand Down Expand Up @@ -821,6 +839,9 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i
}
return nil
})
if isResourceTimeoutError(err) {
_, err = conn.AddApplicationReferenceDataSource(addOpts)
}
if err != nil {
return fmt.Errorf("Unable to add application reference data source: %s", err)
}
Expand Down

0 comments on commit cab6db1

Please sign in to comment.