-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
120 lines (101 loc) · 3.58 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Required variables
variable "name" {
type = string
description = "A unique name for this CloudWatch Metric Stream."
default = "uptrace-cloudwatch-metrics"
validation {
condition = length(var.name) >= 1 && length(var.name) <= 32
error_message = "We use var.name as a name_prefix, so it must be 1-32 characters in length."
}
}
variable "uptrace_dsn" {
type = string
description = "Your Uptrace DSN."
sensitive = true
}
variable "uptrace_api_host" {
type = string
default = "https://api.uptrace.dev"
description = "If you use a Secure Tenancy or other proxy, put its schema://host[:port] here."
}
# Optional variables for customer configuration
variable "enable_lambda_transform" {
type = bool
description = "Enable a Lambda transform on the Kinesis Firehose to preprocess and structure the logs"
default = false
}
variable "lambda_transform_arn" {
type = string
description = "If enable_lambda_transform is set to true, specify a valid arn"
default = ""
}
variable "tags" {
type = map(string)
default = {}
description = "A map of tags to apply to resources created by this module."
}
variable "namespace_include_filters" {
type = list(string)
default = []
description = "An optional list of CloudWatch Metric namespaces to include. If set, we'll only stream metrics from these namespaces. Mutually exclusive with `namespace_exclude_filters`."
}
variable "namespace_exclude_filters" {
type = list(string)
default = []
description = "An optional list of CloudWatch Metric namespaces to exclude. If set, we'll only stream metrics that are not in these namespaces. Mutually exclusive with `namespace_include_filters`."
}
variable "s3_failure_bucket_arn" {
type = string
description = "ARN of the S3 bucket that will store any logs that failed to be sent to Uptrace."
}
variable "s3_buffer_size" {
type = number
default = 10
description = "In MiB. See https://docs.aws.amazon.com/firehose/latest/dev/create-configure.html"
validation {
condition = var.s3_buffer_size >= 1 && var.s3_buffer_size <= 128
error_message = "The s3_buffer_size must be 1-128 MiBs."
}
}
variable "s3_buffer_interval" {
type = number
default = 400
description = "In seconds. See https://docs.aws.amazon.com/firehose/latest/dev/create-configure.html"
validation {
condition = var.s3_buffer_interval >= 60 && var.s3_buffer_interval <= 900
error_message = "The s3_buffer_interval must be 60-900 seconds."
}
}
variable "s3_compression_format" {
type = string
default = "GZIP"
description = "May be GZIP, Snappy, Zip, or Hadoop-Compatiable Snappy. See https://docs.aws.amazon.com/firehose/latest/dev/create-configure.html"
validation {
condition = contains(["GZIP",
"Snappy",
"Zip",
"Hadoop-Compatible Snappy"],
var.s3_compression_format)
error_message = "Not an allowed compression format."
}
}
variable "s3_backup_mode" {
type = string
default = "FailedDataOnly"
description = "Should we only backup to S3 data that failed delivery, or all data?"
validation {
condition = contains(["FailedDataOnly", "AllData"],
var.s3_backup_mode)
error_message = "Not an allowed s3_backup_mode."
}
}
variable "http_buffering_size" {
type = number
default = 15
description = "Kinesis Firehose http buffer size, in MiB."
}
variable "http_buffering_interval" {
type = number
default = 60
description = "Kinesis Firehose http buffer interval, in seconds."
}