diff --git a/builtin/providers/aws/resource_aws_kinesis_stream.go b/builtin/providers/aws/resource_aws_kinesis_stream.go index 4f4a79e6b..45d685c1d 100644 --- a/builtin/providers/aws/resource_aws_kinesis_stream.go +++ b/builtin/providers/aws/resource_aws_kinesis_stream.go @@ -82,7 +82,6 @@ func resourceAwsKinesisStreamRead(d *schema.ResourceData, meta interface{}) erro conn := meta.(*AWSClient).kinesisconn describeOpts := &kinesis.DescribeStreamInput{ StreamName: aws.String(d.Get("name").(string)), - Limit: aws.Int64(1), } resp, err := conn.DescribeStream(describeOpts) if err != nil { @@ -138,7 +137,6 @@ func streamStateRefreshFunc(conn *kinesis.Kinesis, sn string) resource.StateRefr return func() (interface{}, string, error) { describeOpts := &kinesis.DescribeStreamInput{ StreamName: aws.String(sn), - Limit: aws.Int64(1), } resp, err := conn.DescribeStream(describeOpts) if err != nil { diff --git a/builtin/providers/aws/resource_aws_kinesis_stream_test.go b/builtin/providers/aws/resource_aws_kinesis_stream_test.go index 77d0b0588..c9580ad22 100644 --- a/builtin/providers/aws/resource_aws_kinesis_stream_test.go +++ b/builtin/providers/aws/resource_aws_kinesis_stream_test.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "math/rand" + "strconv" "strings" "testing" "time" @@ -46,7 +47,6 @@ func testAccCheckKinesisStreamExists(n string, stream *kinesis.StreamDescription conn := testAccProvider.Meta().(*AWSClient).kinesisconn describeOpts := &kinesis.DescribeStreamInput{ StreamName: aws.String(rs.Primary.Attributes["name"]), - Limit: aws.Int64(1), } resp, err := conn.DescribeStream(describeOpts) if err != nil { @@ -71,6 +71,10 @@ func testAccCheckAWSKinesisStreamAttributes(stream *kinesis.StreamDescription) r if *stream.StreamARN != rs.Primary.Attributes["arn"] { return fmt.Errorf("Bad Stream ARN\n\t expected: %s\n\tgot: %s\n", rs.Primary.Attributes["arn"], *stream.StreamARN) } + shard_count := strconv.Itoa(len(stream.Shards)) + if shard_count != rs.Primary.Attributes["shard_count"] { + return fmt.Errorf("Bad Stream Shard Count\n\t expected: %s\n\tgot: %s\n", rs.Primary.Attributes["shard_count"], shard_count) + } } return nil } @@ -84,7 +88,6 @@ func testAccCheckKinesisStreamDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*AWSClient).kinesisconn describeOpts := &kinesis.DescribeStreamInput{ StreamName: aws.String(rs.Primary.Attributes["name"]), - Limit: aws.Int64(1), } resp, err := conn.DescribeStream(describeOpts) if err == nil { @@ -103,6 +106,6 @@ func testAccCheckKinesisStreamDestroy(s *terraform.State) error { var testAccKinesisStreamConfig = fmt.Sprintf(` resource "aws_kinesis_stream" "test_stream" { name = "terraform-kinesis-test-%d" - shard_count = 1 + shard_count = 2 } `, rand.New(rand.NewSource(time.Now().UnixNano())).Int())