Skip to content

Commit

Permalink
Merge pull request #5541 from terraform-providers/b-aws_kinesis_fireh…
Browse files Browse the repository at this point in the history
…ose_delivery_stream-additional-iam-retry

resource/aws_kinesis_firehose_delivery_stream: Retry on additional IAM eventual consistency error
  • Loading branch information
bflad authored Aug 13, 2018
2 parents 26fe8f7 + 6af47aa commit 779b299
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aws/resource_aws_kinesis_firehose_delivery_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -2070,6 +2070,10 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta
if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to") {
return resource.RetryableError(err)
}
// InvalidArgumentException: Verify that the IAM role has access to the ElasticSearch domain.
if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Verify that the IAM role has access") {
return resource.RetryableError(err)
}
// IAM roles can take ~10 seconds to propagate in AWS:
// http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console
if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Firehose is unable to assume role") {
Expand Down Expand Up @@ -2195,6 +2199,10 @@ func resourceAwsKinesisFirehoseDeliveryStreamUpdate(d *schema.ResourceData, meta
if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "is not authorized to") {
return resource.RetryableError(err)
}
// InvalidArgumentException: Verify that the IAM role has access to the ElasticSearch domain.
if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Verify that the IAM role has access") {
return resource.RetryableError(err)
}
// IAM roles can take ~10 seconds to propagate in AWS:
// http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console
if isAWSErr(err, firehose.ErrCodeInvalidArgumentException, "Firehose is unable to assume role") {
Expand Down

0 comments on commit 779b299

Please sign in to comment.