Skip to content
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: Allow processor clearing #11649

Merged

Conversation

camlow325
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #11305

Release note for CHANGELOG:

* resource/aws_kinesis_firehose_delivery_stream: Allow processors to be cleared from extended S3 configuration

If a processor has previously been added to the extended S3 configuration for a Kinesis firehose delivery stream and an attempt is made to remove the processor for a subsequent apply, the stream resource currently attempts to pass in a processor with empty data. The UpdateDestination function in the AWS SDK rejects this processor as invalid per its schema and fails the apply.

With the changes in this commit, the stream resource would remove empty processor elements before passing them up to the UpdateDestination call. This allows the empty processor elements to be removed successfully.

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSKinesisFirehoseDeliveryStream_'
...
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration (72.65s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OpenXJsonSerDe_Empty (84.32s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_ParquetSerDe_Empty (84.82s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OrcSerDe_Empty (86.81s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (92.66s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Serializer_Update (99.07s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_basic (100.02s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ErrorOutputPrefix (100.22s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Deserializer_Update (101.59s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn (104.93s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_HiveJsonSerDe_Empty (109.56s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithTags (112.94s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ExternalUpdate (114.35s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource (117.80s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates (125.21s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (141.99s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (77.82s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (88.79s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (175.05s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithSSE (199.39s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Enabled (124.94s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (566.48s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (706.62s)

References:
* hashicorp#11305

If a processor has previously been added to the extended S3
configuration for a Kinesis firehose delivery stream and an attempt is
made to remove the processor for a subsequent apply, the stream resource
currently attempts to pass in a processor with empty data. The
UpdateDestination function in the AWS SDK rejects this processor as
invalid per its schema and fails the apply.

With the changes in this commit, the stream resource would remove empty
processor elements before passing them up to the UpdateDestination call.
This allows the empty processor elements to be removed successfully.

Output from acceptance testing:

```
make testacc TEST=./aws TESTARGS='-run=TestAccAWSKinesisFirehoseDeliveryStream_'
...
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration (72.65s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OpenXJsonSerDe_Empty (84.32s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_ParquetSerDe_Empty (84.82s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OrcSerDe_Empty (86.81s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (92.66s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Serializer_Update (99.07s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_basic (100.02s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ErrorOutputPrefix (100.22s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Deserializer_Update (101.59s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn (104.93s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_HiveJsonSerDe_Empty (109.56s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithTags (112.94s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ExternalUpdate (114.35s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource (117.80s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates (125.21s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (141.99s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (77.82s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (88.79s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (175.05s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithSSE (199.39s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Enabled (124.94s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (566.48s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (706.62s)
```
@camlow325 camlow325 requested a review from a team January 17, 2020 23:18
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/firehose Issues and PRs that pertain to the firehose service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jan 17, 2020
@bflad bflad added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 6, 2020
@bflad bflad added this to the v2.48.0 milestone Feb 6, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for this fix, @camlow325 🚀

Output from acceptance testing:

--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (81.42s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Serializer_Update (98.34s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OpenXJsonSerDe_Empty (101.10s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ExternalUpdate (104.11s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_ErrorOutputPrefix (104.91s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource (106.40s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (107.67s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_ParquetSerDe_Empty (110.05s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3KmsKeyArn (116.36s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Deserializer_Update (118.86s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_basic (121.91s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_OrcSerDe_Empty (122.04s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithTags (125.74s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_Enabled (127.68s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (130.14s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3_DataFormatConversionConfiguration_HiveJsonSerDe_Empty (131.83s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (137.09s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (169.04s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration (86.67s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates (121.74s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basicWithSSE (217.80s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (451.35s)
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (1063.42s)

@bflad bflad merged commit 4bdfa72 into hashicorp:master Feb 6, 2020
bflad added a commit that referenced this pull request Feb 6, 2020
@ghost
Copy link

ghost commented Feb 7, 2020

This has been released in version 2.48.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!

@ghost
Copy link

ghost commented Mar 27, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/firehose Issues and PRs that pertain to the firehose service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to remove aws_kinesis_firehose_delivery_stream S3 processors
2 participants