-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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: add splunk configuration #3117
Conversation
WhileLoop
commented
Jan 23, 2018
•
edited
Loading
edited
Closes #2897 |
Is there any ETA on the splunk destination for Firehose? Thanks. |
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 adding this! Left some minor feedback below. Please let us know if you have any questions or when its good to check again.
Passes acceptance testing for me:
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidParameterName
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidParameterName (1.81s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidProcessorType
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3InvalidProcessorType (1.75s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3KinesisStreamSource (120.72s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_missingProcessingConfiguration (275.91s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_importBasic
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_importBasic (277.04s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3basic (277.80s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_s3basic
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3basic (281.12s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3WithCloudwatchLogging (282.33s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ExtendedS3Updates (285.33s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_SplunkConfigUpdates (290.26s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_s3ConfigUpdates (385.68s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_RedshiftConfigUpdates (1084.68s)
=== RUN TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates
--- PASS: TestAccAWSKinesisFirehoseDeliveryStream_ElasticsearchConfigUpdates (1229.60s)
Type: schema.TypeInt, | ||
Optional: true, | ||
Default: 180, | ||
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { |
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.
We have a function to make this easier. 😄 ValidateFunc: validateIntegerInRange(180, 600),
"hec_endpoint_type": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Default: "Raw", |
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.
Nitpick: The SDK provides a constant for "Raw"
here: firehose.HECEndpointTypeRaw
Default: "Raw", | ||
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { | ||
value := v.(string) | ||
if value != "Raw" && value != "Event" { |
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.
Same note about SDK constants here. firehose.HECEndpointTypeRaw
and firehose.HECEndpointTypeEvent
"s3_backup_mode": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Default: "FailedEventsOnly", |
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.
Nitpick: SDK constants available for here and validation below:
firehose.SplunkS3BackupModeAllEvents
firehose.SplunkS3BackupModeFailedEventsOnly
Type: schema.TypeInt, | ||
Optional: true, | ||
Default: 3600, | ||
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { |
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.
Similar note as above: ValidateFunc: validateIntegerInRange(0, 7200),
"hec_token": *destination.SplunkDestinationDescription.HECToken, | ||
"s3_backup_mode": *destination.SplunkDestinationDescription.S3BackupMode, | ||
"retry_duration": *destination.SplunkDestinationDescription.RetryOptions.DurationInSeconds, | ||
"cloudwatch_logging_options": flattenCloudwatchLoggingOptions(*destination.SplunkDestinationDescription.CloudWatchLoggingOptions), |
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.
Not for this PR, but we currently are getting crashes dereferencing CloudWatch logging options for other destination types as this information is not always returned by the API. We'll probably want to fix all of them at once.
@bflad ship it! :) |
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! LGTM
This has been released in terraform-provider-aws version 1.9.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
Data transformation via Lambda is still not available for the Firehose resource. Can this be added ASAP with Splunk as a destination? #513 |
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! |