variables.tf 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. variable "s3_expiration" {
  2. description = "How many days to retain objects in s3"
  3. type = number
  4. default = 30
  5. }
  6. variable "region" {
  7. description = "The region of AWS you want to work in, such as us-west-2 or us-east-1"
  8. }
  9. variable "hec_url" {
  10. description = "Splunk Kinesis URL for submitting CloudWatch logs to splunk"
  11. }
  12. variable "hec_token" {
  13. description = "Splunk security token needed to submit data to Splunk"
  14. }
  15. variable "nodejs_runtime" {
  16. description = "Runtime version of nodejs for Lambda function"
  17. default = "nodejs16.x"
  18. }
  19. variable "firehose_name" {
  20. description = "Name of the Kinesis Firehose"
  21. default = "kinesis-firehose-to-splunk"
  22. }
  23. variable "kinesis_firehose_buffer" {
  24. description = "https://www.terraform.io/docs/providers/aws/r/kinesis_firehose_delivery_stream.html#buffer_size"
  25. default = 5 # Megabytes
  26. }
  27. variable "kinesis_firehose_buffer_interval" {
  28. description = "Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination"
  29. default = 300 # Seconds
  30. }
  31. variable "s3_prefix" {
  32. description = "Optional prefix (a slash after the prefix will show up as a folder in the s3 bucket). The YYYY/MM/DD/HH time format prefix is automatically used for delivered S3 files."
  33. default = "kinesis-firehose/"
  34. }
  35. variable "hec_acknowledgment_timeout" {
  36. description = "The amount of time, in seconds between 180 and 600, that Kinesis Firehose waits to receive an acknowledgment from Splunk after it sends it data."
  37. default = 300
  38. }
  39. variable "hec_endpoint_type" {
  40. description = "Splunk HEC endpoint type; `Raw` or `Event`"
  41. default = "Raw"
  42. }
  43. variable "s3_backup_mode" {
  44. description = "Defines how documents should be delivered to Amazon S3. Valid values are FailedEventsOnly and AllEvents."
  45. default = "FailedEventsOnly"
  46. }
  47. variable "s3_compression_format" {
  48. description = "The compression format for what the Kinesis Firehose puts in the s3 bucket"
  49. default = "GZIP"
  50. }
  51. variable "enable_fh_cloudwatch_logging" {
  52. description = "Enable kinesis firehose CloudWatch logging. (It only logs errors)"
  53. default = true
  54. }
  55. variable "tags" {
  56. type = map(string)
  57. description = "Map of tags to put on the resource"
  58. default = {}
  59. }
  60. variable "cloudwatch_log_retention" {
  61. description = "Length in days to keep CloudWatch logs of Kinesis Firehose"
  62. default = 30
  63. }
  64. variable "log_stream_name" {
  65. description = "Name of the CloudWatch log stream for Kinesis Firehose CloudWatch log group"
  66. default = "SplunkDelivery"
  67. }
  68. variable "s3_bucket_name" {
  69. description = "Name of the s3 bucket Kinesis Firehose uses for backups"
  70. }
  71. variable "s3_bucket_block_public_access_enabled" {
  72. description = "Set to 1 if you would like to add block public access settings for the s3 bucket Kinesis Firehose uses for backups"
  73. default = 0
  74. }
  75. variable "encryption_context" {
  76. description = "aws_kms_secrets encryption context"
  77. type = map(string)
  78. default = {}
  79. }
  80. variable "kinesis_firehose_lambda_role_name" {
  81. description = "Name of IAM Role for Lambda function that transforms CloudWatch data for Kinesis Firehose into Splunk compatible format"
  82. default = "KinesisFirehoseToLambaRole"
  83. }
  84. variable "kinesis_firehose_role_name" {
  85. description = "Name of IAM Role for the Kinesis Firehose"
  86. default = "KinesisFirehoseRole"
  87. }
  88. variable "arn_cloudwatch_logs_to_ship" {
  89. description = "arn of the CloudWatch Log Group that you want to ship to Splunk."
  90. }
  91. variable "name_cloudwatch_logs_to_ship" {
  92. description = "name of the CloudWatch Log Group that you want to ship to Splunk."
  93. }
  94. variable "lambda_function_name" {
  95. description = "Name of the Lambda function that transforms CloudWatch data for Kinesis Firehose into Splunk compatible format"
  96. default = "kinesis-firehose-transform"
  97. }
  98. variable "lambda_function_timeout" {
  99. description = "The function execution time at which Lambda should terminate the function."
  100. default = 180
  101. }
  102. variable "lambda_iam_policy_name" {
  103. description = "Name of the IAM policy that is attached to the IAM Role for the lambda transform function"
  104. default = "Kinesis-Firehose-to-Splunk-Policy"
  105. }
  106. #variable "kms_key_arn" {
  107. # description = "arn of the KMS key you used to encrypt the hec_token"
  108. #}
  109. variable "kinesis_firehose_iam_policy_name" {
  110. description = "Name of the IAM Policy attached to IAM Role for the Kinesis Firehose"
  111. default = "KinesisFirehose-Policy"
  112. }
  113. variable "cloudwatch_to_firehose_trust_iam_role_name" {
  114. description = "IAM Role name for CloudWatch to Kinesis Firehose subscription"
  115. default = "CloudWatchToSplunkFirehoseTrust"
  116. }
  117. variable "cloudwatch_to_fh_access_policy_name" {
  118. description = "Name of IAM policy attached to the IAM role for CloudWatch to Kinesis Firehose subscription"
  119. default = "KinesisCloudWatchToFirehosePolicy"
  120. }
  121. variable "cloudwatch_log_filter_name" {
  122. description = "Name of Log Filter for CloudWatch Log subscription to Kinesis Firehose"
  123. default = "KinesisSubscriptionFilter"
  124. }
  125. variable "subscription_filter_pattern" {
  126. description = "Filter pattern for the CloudWatch Log Group subscription to the Kinesis Firehose. See [this](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html) for filter pattern info."
  127. default = "" # nothing is being filtered
  128. }