Skip to content

Commit

Permalink
Merge pull request #1896 from terraform-providers/b-kms-alias-retry-c…
Browse files Browse the repository at this point in the history
…reation

r/kms_alias: Retry creation on NotFoundException
  • Loading branch information
radeksimko authored Oct 16, 2017
2 parents c365570 + c43dfcd commit 8a3c35a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion aws/resource_aws_kms_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ func resourceAwsKmsAliasCreate(d *schema.ResourceData, meta interface{}) error {
AliasName: aws.String(name),
TargetKeyId: aws.String(targetKeyId),
}
_, err := conn.CreateAlias(req)

// KMS is eventually consistent
_, err := retryOnAwsCode("NotFoundException", func() (interface{}, error) {
return conn.CreateAlias(req)
})
if err != nil {
return err
}
Expand Down

0 comments on commit 8a3c35a

Please sign in to comment.