-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource/aws_kinesis_firehose_delivery_stream: Fix crash in processing_configuration #1738
Conversation
…g_configuration Fixes: hashicorp#1657 Before this patch: ``` 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: panic: runtime error: index out of range 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: goroutine 2687 [running]: 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: github.com/terraform-providers/terraform-provider-aws/aws.extractProcessingConfiguration(0xc420c8f650, 0xc42080b710) 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:541 +0x2ad 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: github.com/terraform-providers/terraform-provider-aws/aws.createExtendedS3Config(0xc4203ecc40, 0xb) 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:483 +0x479 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsKinesisFirehoseDeliveryStreamCreate(0xc4203ecc40, 0x29c5ec0, 0xc421689a00, 0x24, 0x40555c0) 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:808 +0xbc5 2017-09-12T11:56:41.138-0600 [DEBUG] plugin.terraform-provider-aws_v0.1.4_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc421937ec0, 0xc420c4a820, 0xc420816140, 0x29c5ec0, 0xc421689a00, 0x1 , 0x28, 0xc420c8edb0) ``` After this patch: ``` terraform-testing % terraform apply aws_s3_bucket.bucket: Refreshing state... (ID: tf-test-bucket-72) aws_iam_role.firehose: Refreshing state... (ID: tf_acctest_firehose_delivery_role_72) aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Creating... arn: "" => "<computed>" destination: "" => "extended_s3" destination_id: "" => "<computed>" extended_s3_configuration.#: "" => "1" extended_s3_configuration.0.bucket_arn: "" => "arn:aws:s3:::tf-test-bucket-72" extended_s3_configuration.0.buffer_interval: "" => "300" extended_s3_configuration.0.buffer_size: "" => "5" extended_s3_configuration.0.cloudwatch_logging_options.#: "" => "<computed>" extended_s3_configuration.0.compression_format: "" => "GZIP" extended_s3_configuration.0.prefix: "" => "tracking/autocomplete_stream/" extended_s3_configuration.0.role_arn: "" => "arn:aws:iam::187416307283:role/tf_acctest_firehose_delivery_role_72" name: "" => "tracking_autocomplete_stream" version_id: "" => "<computed>" aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Still creating... (10s elapsed) aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Still creating... (2m0s elapsed) aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Still creating... (3m30s elapsed) aws_kinesis_firehose_delivery_stream.broken_tracking_autocomplete_stream: Creation complete after 3m38s (ID: arn:aws:firehose:us-west-2:187416307283...erystream/tracking_autocomplete_stream) Apply complete! Resources: 1 added, 0 changed, 0 destroyed. ``` Test Output: ``` terraform-provider-aws [b-aws-kfhd-crash-1657●] % acctests aws TestAccAWSKinesisFirehoseDeliveryStream_ === RUN TestAccAWSKinesisFirehoseDeliveryStream_s3basic --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (142.95s) === RUN TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (153.92s) === RUN TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (266.77s) === RUN TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (282.11s) === RUN TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidProcessorType --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidProcessorType (2.86s) === RUN TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidParameterName --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidParameterName (2.49s) === RUN TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (182.25s) === RUN TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (902.22s) === RUN TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (1236.74s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 3172.372s ```
905cd11
to
a476890
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix. I just added an acceptance test to cover it. 👍
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Fixes: #1657
Before this patch:
After this patch:
Test Output: