diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index 070f1e8b9b0..66afcdb5b2c 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -38,6 +38,28 @@ func TestAccAWSKinesisFirehoseDeliveryStream_s3basic(t *testing.T) { }) } +func TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource(t *testing.T) { + var stream firehose.DeliveryStreamDescription + ri := acctest.RandInt() + config := fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamConfig_s3KinesisStreamSource, + ri, os.Getenv("AWS_ACCOUNT_ID"), ri, ri, ri, ri, os.Getenv("AWS_ACCOUNT_ID"), ri, ri, ri) + + resource.Test(t, resource.TestCase{ + PreCheck: testAccKinesisFirehosePreCheck(t), + Providers: testAccProviders, + CheckDestroy: testAccCheckKinesisFirehoseDeliveryStreamDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testAccCheckKinesisFirehoseDeliveryStreamExists("aws_kinesis_firehose_delivery_stream.test_stream", &stream), + testAccCheckAWSKinesisFirehoseDeliveryStreamAttributes(&stream, nil, nil, nil, nil), + ), + }, + }, + }) +} + func TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging(t *testing.T) { var stream firehose.DeliveryStreamDescription ri := acctest.RandInt() @@ -614,6 +636,62 @@ EOF ` +const testAccFirehoseKinesisStreamSource = ` +resource "aws_kinesis_stream" "source" { + name = "terraform-kinesis-source-stream-basictest-%d" + shard_count = 1 +} + +resource "aws_iam_role" "kinesis_source" { + name = "tf_acctest_kinesis_source_role_%d" + assume_role_policy = <