generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 6
/
variables.tf
135 lines (113 loc) · 4.12 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Required variables
variable "name" {
type = string
description = "A name for this CloudWatch Metric Stream."
# required, no default
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 "honeycomb_dataset_name" {
type = string
description = "Your Honeycomb dataset name."
}
variable "honeycomb_api_key" {
type = string
description = "Your Honeycomb team's API key."
}
# Optional variables for customer configuration
variable "honeycomb_api_host" {
type = string
default = "https://api.honeycomb.io"
description = "If you use a Secure Tenancy or other proxy, put its schema://host[:port] here."
}
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_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 "s3_force_destroy" {
type = bool
default = true
description = <<EOF
By default, AWS will decline to delete S3 buckets that are not empty:
`BucketNotEmpty: The bucket you tried to delete is not empty`. These buckets
are used for backup if delivery or processing fail.
#
To allow this module's resources to be removed, we've set force_destroy =
true, allowing non-empty buckets to be deleted. If you want to block this and
preserve those failed deliveries, you can set this value to false, though that
will leave terraform unable to cleanly destroy the module.
EOF
}
variable "output_format" {
type = string
default = "opentelemetry0.7"
description = "Output format of metrics. You should probably not modify this value; the default format is supported, but others may not be."
validation {
condition = contains(["json", "opentelemetry0.7"], var.output_format)
error_message = "Not an allowed output format."
}
}
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."
}