-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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: Prevent panic with empty processing_configuration
configuration block
#12613
resource/aws_kinesis_firehose_delivery_stream: Prevent panic with empty processing_configuration
configuration block
#12613
Conversation
…ty `processing_configuration` configuration block Reference: #12600 Previously: ``` === CONT TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ProcessingConfiguration_Empty panic: interface conversion: interface {} is nil, not map[string]interface {} goroutine 118 [running]: github.com/terraform-providers/terraform-provider-aws/aws.extractProcessingConfiguration(0xc00184d260, 0xc00184d260) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:1740 +0x2c8 github.com/terraform-providers/terraform-provider-aws/aws.createExtendedS3Config(0xc00046aaf0, 0x6e20c0a) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:1447 +0x87d github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsKinesisFirehoseDeliveryStreamCreate(0xc00046aaf0, 0x62e1d20, 0xc0006cc500, 0x2, 0xb612ec0) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:2119 +0xee2 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000a7c400, 0xc00018e230, 0xc0008dc980, 0x62e1d20, 0xc0006cc500, 0x6167b01, 0xc001428fa8, 0xc001690d50) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.8.0/helper/schema/resource.go:305 +0x365 ``` Output from acceptance testing: ``` --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_basic (133.73s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (827.20s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Deserializer_Update (125.27s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Enabled (147.94s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_HiveJsonSerDe_Empty (125.16s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OpenXJsonSerDe_Empty (117.24s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OrcSerDe_Empty (124.51s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_ParquetSerDe_Empty (90.80s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Serializer_Update (110.44s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ErrorOutputPrefix (116.60s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ExternalUpdate (133.58s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ProcessingConfiguration_Empty (101.05s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (140.86s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn (138.74s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (192.36s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration (101.08s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (419.73s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (98.32s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithSSE (231.02s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithTags (153.05s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (199.63s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource (105.65s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (118.33s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates (159.89s) ```
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.
LGTM 🚀
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource (92.96s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (109.09s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ExternalUpdate (122.40s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ErrorOutputPrefix (128.19s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OrcSerDe_Empty (128.88s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_HiveJsonSerDe_Empty (130.07s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Serializer_Update (130.06s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_basic (131.36s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (136.63s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Deserializer_Update (137.22s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (137.52s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ProcessingConfiguration_Empty (146.68s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (148.49s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Enabled (153.13s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithTags (154.27s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OpenXJsonSerDe_Empty (158.26s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_ParquetSerDe_Empty (159.73s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn (165.69s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (193.26s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration (81.26s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates (120.08s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithSSE (230.39s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (514.25s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (810.27s)
@@ -1995,6 +2024,24 @@ resource "aws_kinesis_firehose_delivery_stream" "test" { | |||
`, rName, errorOutputPrefix) | |||
} | |||
|
|||
func testAccKinesisFirehoseDeliveryStreamConfig_ExtendedS3_ProcessingConfiguration_Empty(rName string, rInt int) string { | |||
return fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamBaseConfig, rInt, rInt, rInt) + fmt.Sprintf(` |
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.
fmt.Sprintf(testAccKinesisFirehoseDeliveryStreamBaseConfig, rInt, rInt, rInt)
is concatenated with a lot of configurations in this test suite. testAccKinesisFirehoseDeliveryStreamBaseConfig
should probably be a function rather than a constant string.
Since the base config is used many places, you could define a composeKinesisFirehoseConfig()
which predefines the base config and accepts the new configuration
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.
Agreed, this whole test file needs refactoring, but that effort seems unrelated to fixing the panic. 🙁
This has been released in version 2.60.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
…ty `processing_configuration` configuration block (hashicorp#12613) Reference: hashicorp#12600 Previously: ``` === CONT TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ProcessingConfiguration_Empty panic: interface conversion: interface {} is nil, not map[string]interface {} goroutine 118 [running]: github.com/terraform-providers/terraform-provider-aws/aws.extractProcessingConfiguration(0xc00184d260, 0xc00184d260) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:1740 +0x2c8 github.com/terraform-providers/terraform-provider-aws/aws.createExtendedS3Config(0xc00046aaf0, 0x6e20c0a) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:1447 +0x87d github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsKinesisFirehoseDeliveryStreamCreate(0xc00046aaf0, 0x62e1d20, 0xc0006cc500, 0x2, 0xb612ec0) /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:2119 +0xee2 github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000a7c400, 0xc00018e230, 0xc0008dc980, 0x62e1d20, 0xc0006cc500, 0x6167b01, 0xc001428fa8, 0xc001690d50) /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.8.0/helper/schema/resource.go:305 +0x365 ``` Output from acceptance testing: ``` --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_basic (133.73s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (827.20s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Deserializer_Update (125.27s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Enabled (147.94s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_HiveJsonSerDe_Empty (125.16s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OpenXJsonSerDe_Empty (117.24s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OrcSerDe_Empty (124.51s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_ParquetSerDe_Empty (90.80s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Serializer_Update (110.44s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ErrorOutputPrefix (116.60s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ExternalUpdate (133.58s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ProcessingConfiguration_Empty (101.05s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (140.86s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn (138.74s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (192.36s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration (101.08s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (419.73s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (98.32s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithSSE (231.02s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithTags (153.05s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (199.63s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource (105.65s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (118.33s) --- PASS: TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates (159.89s) ```
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! |
Community Note
Closes #12600
Release note for CHANGELOG:
Previously:
Output from acceptance testing: