-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathmsk.tf
More file actions
52 lines (44 loc) · 1.13 KB
/
msk.tf
File metadata and controls
52 lines (44 loc) · 1.13 KB
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
resource "aws_security_group" "broker" {
name_prefix = "${var.name_prefix}-kafka-broker"
vpc_id = module.vpc.vpc_id
ingress {
description = "Allow connections from the worker group"
security_groups = [aws_security_group.all_worker_mgmt.id]
protocol = "tcp"
from_port = 0
to_port = 65535
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = var.tags
}
resource "aws_msk_cluster" "msk" {
cluster_name = "${var.name_prefix}-kafka"
kafka_version = "2.4.1.1"
number_of_broker_nodes = 2
broker_node_group_info {
instance_type = "kafka.t3.small"
ebs_volume_size = 100
client_subnets = [module.vpc.private_subnets[0], module.vpc.private_subnets[1]]
security_groups = [aws_security_group.broker.id]
}
encryption_info {
encryption_in_transit {
client_broker = "TLS_PLAINTEXT"
}
}
logging_info {
broker_logs {
s3 {
enabled = true
bucket = aws_s3_bucket.feast_bucket.id
prefix = "msk-logs"
}
}
}
tags = var.tags
}