Skip to content

Commit 1c1abe5

Browse files
author
hellertang
authored
add ckafka example (#830)
1 parent 9a9cfb4 commit 1c1abe5

File tree

6 files changed

+47
-0
lines changed

6 files changed

+47
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
resource "tencentcloud_route_table" "rtb_test" {
2+
name = "rtb-test"
3+
vpc_id = "${tencentcloud_vpc.vpc_test.id}"
4+
}
5+
6+
resource "tencentcloud_subnet" "subnet_test" {
7+
name = "subnet-test"
8+
cidr_block = "10.0.1.0/24"
9+
availability_zone = "ap-guangzhou-6"
10+
vpc_id = "${tencentcloud_vpc.vpc_test.id}"
11+
route_table_id = "${tencentcloud_route_table.rtb_test.id}"
12+
}
13+
14+
resource "tencentcloud_vpc" "vpc_test" {
15+
name = "vpc-test"
16+
cidr_block = "10.0.0.0/16"
17+
}
18+
19+
# create ckafka instance
20+
resource "tencentcloud_ckafka_instance" "foo" {
21+
instance_name = "tf-test"
22+
zone_id = 100006
23+
period = 1
24+
vpc_id = "${tencentcloud_vpc.vpc_test.id}"
25+
subnet_id = "${tencentcloud_subnet.subnet_test.id}"
26+
msg_retention_time = 1300
27+
renew_flag = 0
28+
kafka_version = "1.1.1"
29+
disk_size = 500
30+
disk_type = "CLOUD_BASIC"
31+
32+
33+
config {
34+
auto_create_topic_enable = true
35+
default_num_partitions = 3
36+
default_replication_factor = 3
37+
}
38+
39+
dynamic_retention_config {
40+
enable = 1
41+
}
42+
}
File renamed without changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
terraform {
2+
required_version = ">= 0.12"
3+
}

0 commit comments

Comments
 (0)