-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvariable.tf
173 lines (144 loc) · 4.36 KB
/
variable.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
variable "name" {
description = "Name of the MSK cluster"
}
variable "environment" {
description = "The environment the MSK cluster is running in i.e. dev, prod etc"
}
variable "kafka_version" {
description = "The Kafka version for the AWS MSK cluster"
default = "2.2.1"
}
variable "number_of_broker_nodes" {
description = "The number of broker nodes running in the MSK cluster"
}
variable "msk_instance_type" {
description = "The MSK cluster instance type"
}
variable "ebs_volume_size" {
description = "The MSK cluster EBS volume size for each broker"
}
variable "vpc_id" {
description = "The MSK cluster's VPC ID"
}
variable "subnet_ids" {
description = "A list of subnets that the MSK cluster should run in"
type = list(string)
}
variable "cidr_blocks" {
description = "The CIDR blocks that the MSK cluster allows ingress connections from"
type = list(string)
default = ["0.0.0.0/0"]
}
variable "certificateauthority" {
description = "Should a CA be created with the MSK cluster?"
default = false
}
variable "ca_arn" {
description = "ARN of the AWS managed CA to attach to the MSK cluster"
default = []
type = list(string)
}
variable "acmpca_iam_user_name" {
description = "The name of the IAM user assigned to the created AWS Private CA"
default = ""
}
variable "config_name" {
description = "Name of the MSK configuration to attach to the MSK cluster"
default = ""
}
variable "config_kafka_versions" {
description = "A list of Kafka versions that the configuration supports"
type = list(string)
default = []
}
variable "config_server_properties" {
description = "The properties to set on the MSK cluster. Omitted properties are set to a default value"
default = ""
}
variable "config_description" {
description = "The description of the MSK configuration"
default = ""
}
variable "config_revision" {
description = "The revision of the MSK configuration to use"
default = ""
}
# to be used if a configuration exists already
variable "config_arn" {
description = "ARN of the MSK configuration to attach to the MSK cluster"
default = ""
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
variable "type" {
description = "The type of the certificate authority"
default = ""
}
variable "enhanced_monitoring" {
description = "The desired enhanced MSK CloudWatch monitoring level"
default = "DEFAULT"
}
variable "prometheus_jmx_exporter_enabled" {
description = "Enable Prometheus open monitoring for the JMX exporter"
type = bool
default = false
}
variable "prometheus_node_exporter_enabled" {
description = "Enable Prometheus open monitoring for the node exporter"
type = bool
default = false
}
variable "encryption_at_rest_kms_key_arn" {
description = "Use to set custom KMS key to encrypt data written to EBS volume"
default = null
}
variable "key_rotation" {
description = "Enable email notifications for old IAM keys."
default = "true"
}
variable "email_addresses" {
description = "A list of email addresses for key rotation notifications."
type = list(string)
default = []
}
variable "storage_autoscaling_max_capacity" {
description = "The MSK cluster EBS maximum volume size for each broker. Value between 1 and 16384."
type = number
default = 1
validation {
condition = (
var.storage_autoscaling_max_capacity >= 1 &&
var.storage_autoscaling_max_capacity <= 16384
)
error_message = "Storage autoscaling max capacity must be between 1 and 16384."
}
}
variable "storage_autoscaling_threshold" {
description = "The percentage threshold that needs to be exceeded to trigger a scale up. Value between 10 and 80."
type = number
default = 65
validation {
condition = (
var.storage_autoscaling_threshold >= 10 &&
var.storage_autoscaling_threshold <= 80
)
error_message = "Storage autoscaling threshold must be between 10 and 80."
}
}
variable "logging_broker_s3" {
description = "Configuration block for Broker Logs settings for s3."
type = object({
enabled = bool
bucket = string
prefix = string
})
default = null
}
variable "iam_authentication" {
description = "Enables IAM client authentication"
type = bool
default = false
}