variables.tf 5.0 KB

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