diff --git a/infrastructure/modules/eventpub/README.md b/infrastructure/modules/eventpub/README.md
index c19e86b..37f64ca 100644
--- a/infrastructure/modules/eventpub/README.md
+++ b/infrastructure/modules/eventpub/README.md
@@ -17,10 +17,12 @@
| [data\_plane\_bus\_arn](#input\_data\_plane\_bus\_arn) | Data plane event bus arn | `string` | n/a | yes |
| [default\_tags](#input\_default\_tags) | Default tag map for application to all taggable resources in the module | `map(string)` | `{}` | no |
| [enable\_event\_cache](#input\_enable\_event\_cache) | Enable caching of events to an S3 bucket | `bool` | `false` | no |
+| [enable\_firehose\_raw\_message\_delivery](#input\_enable\_firehose\_raw\_message\_delivery) | Enables raw message delivery on firehose subscription | `bool` | `false` | no |
| [enable\_sns\_delivery\_logging](#input\_enable\_sns\_delivery\_logging) | Enable SNS Delivery Failure Notifications | `bool` | `false` | no |
| [environment](#input\_environment) | The name of the terraformscaffold environment the module is called for | `string` | n/a | yes |
| [event\_cache\_buffer\_interval](#input\_event\_cache\_buffer\_interval) | The buffer interval for data firehose | `number` | `500` | no |
| [event\_cache\_expiry\_days](#input\_event\_cache\_expiry\_days) | s3 archiving expiry in days | `number` | `30` | no |
+| [force\_destroy](#input\_force\_destroy) | When enabled will force destroy event-cache S3 bucket | `bool` | `false` | no |
| [group](#input\_group) | The name of the tfscaffold group | `string` | `null` | no |
| [iam\_permissions\_boundary\_arn](#input\_iam\_permissions\_boundary\_arn) | The ARN of the permissions boundary to use for the IAM role | `string` | `null` | no |
| [kms\_key\_arn](#input\_kms\_key\_arn) | KMS key arn to use for this function | `string` | n/a | yes |
diff --git a/infrastructure/modules/eventpub/module_s3bucket_event_cache.tf b/infrastructure/modules/eventpub/module_s3bucket_event_cache.tf
index 1aec2c6..2784ae6 100644
--- a/infrastructure/modules/eventpub/module_s3bucket_event_cache.tf
+++ b/infrastructure/modules/eventpub/module_s3bucket_event_cache.tf
@@ -12,7 +12,7 @@ module "s3bucket_event_cache" {
component = var.component
acl = "private"
- force_destroy = false
+ force_destroy = var.force_destroy
versioning = true
lifecycle_rules = [
diff --git a/infrastructure/modules/eventpub/sns_topic_subscription_firehose.tf b/infrastructure/modules/eventpub/sns_topic_subscription_firehose.tf
index 9ed83cc..42457f6 100644
--- a/infrastructure/modules/eventpub/sns_topic_subscription_firehose.tf
+++ b/infrastructure/modules/eventpub/sns_topic_subscription_firehose.tf
@@ -5,4 +5,5 @@ resource "aws_sns_topic_subscription" "firehose" {
protocol = "firehose"
subscription_role_arn = aws_iam_role.sns_role.arn
endpoint = aws_kinesis_firehose_delivery_stream.main[0].arn
+ raw_message_delivery = var.enable_firehose_raw_message_delivery
}
diff --git a/infrastructure/modules/eventpub/variables.tf b/infrastructure/modules/eventpub/variables.tf
index e19c331..9fa2a66 100644
--- a/infrastructure/modules/eventpub/variables.tf
+++ b/infrastructure/modules/eventpub/variables.tf
@@ -73,8 +73,6 @@ variable "enable_sns_delivery_logging" {
default = false
}
-
-
variable "sns_success_logging_sample_percent" {
type = number
description = "Enable SNS Delivery Successful Sample Percentage"
@@ -99,6 +97,12 @@ variable "enable_event_cache" {
default = false
}
+variable "enable_firehose_raw_message_delivery" {
+ type = bool
+ description = "Enables raw message delivery on firehose subscription"
+ default = false
+}
+
variable "data_plane_bus_arn" {
type = string
description = "Data plane event bus arn"
@@ -114,3 +118,8 @@ variable "iam_permissions_boundary_arn" {
description = "The ARN of the permissions boundary to use for the IAM role"
default = null
}
+variable "force_destroy" {
+ type = bool
+ description = "When enabled will force destroy event-cache S3 bucket"
+ default = false
+}