-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsk.tf
95 lines (76 loc) · 1.67 KB
/
msk.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
# 3 x t3.small: $109.28/month
resource "aws_msk_cluster" "kafka" {
cluster_name = "kafka"
kafka_version = "2.6.2"
number_of_broker_nodes = 3
broker_node_group_info {
instance_type = "kafka.t3.small"
client_subnets = [
aws_subnet.subnet-1a.id,
aws_subnet.subnet-1b.id,
aws_subnet.subnet-1c.id,
]
storage_info {
ebs_storage_info {
volume_size = 50
}
}
security_groups = [
aws_security_group.kafka.id,
]
}
configuration_info {
arn = aws_msk_configuration.configuration_debezium.arn
revision = 1
}
client_authentication {
unauthenticated = true
sasl {
iam = false
scram = false
}
}
encryption_info {
encryption_at_rest_kms_key_arn = aws_kms_key.kafka_key.arn
encryption_in_transit {
client_broker = "PLAINTEXT"
}
}
open_monitoring {
prometheus {
jmx_exporter {
enabled_in_broker = true
}
node_exporter {
enabled_in_broker = true
}
}
}
logging_info {
broker_logs {
cloudwatch_logs {
enabled = true
log_group = aws_cloudwatch_log_group.kafka_broker_logs.name
}
firehose {
enabled = false
}
s3 {
enabled = false
}
}
}
timeouts {}
tags = {
Name = var.default_tag
}
}
resource "aws_msk_configuration" "configuration_debezium" {
kafka_versions = ["2.6.2"]
name = "kafka-configuration"
description = "MSK config, auto create topic for Debezium"
server_properties = <<PROPERTIES
auto.create.topics.enable = true
zookeeper.connection.timeout.ms = 1000
PROPERTIES
}