File tree 28 files changed +124
-93
lines changed
28 files changed +124
-93
lines changed Original file line number Diff line number Diff line change
1
+ name : Checks
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ pull_request :
7
+
8
+ jobs :
9
+ lint :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ -
uses :
hashicorp/[email protected]
14
+
15
+ -
uses :
pre-commit/[email protected]
Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : https://github.com/antonbabenko/pre-commit-terraform
3
+ rev : v1.86.0
4
+ hooks :
5
+ - id : terraform_fmt
Original file line number Diff line number Diff line change
1
+ ## Linting
2
+
3
+ Linting is handled via ` pre-commit ` . Follow the [ install
4
+ instructions] ( https://pre-commit.com/#install ) , and additionally [ install
5
+ Terraform] ( https://developer.hashicorp.com/terraform/install ) then install and
6
+ run the hooks:
7
+
8
+ ``` console
9
+ $ pre-commit install
10
+ $ pre-commit run --all-hooks
11
+ ```
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ resource "kafka_topic" "account-debt-events" {
41
41
}
42
42
43
43
resource "kafka_topic" "debt-collection-events" {
44
- name = " debt-collection.events"
44
+ name = " debt-collection.events"
45
45
replication_factor = 3
46
46
partitions = 3
47
47
config = {
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ resource "kafka_topic" "dd_run_reconciliation_events" {
15
15
partitions = 10
16
16
config = {
17
17
" max.message.bytes" = " 1048576"
18
- " retention.bytes" = " -1"
19
- " retention.ms" = " 259200000" # 3 days, maybe worth doing it less
20
- " cleanup.policy" = " delete"
18
+ " retention.bytes" = " -1"
19
+ " retention.ms" = " 259200000" # 3 days, maybe worth doing it less
20
+ " cleanup.policy" = " delete"
21
21
}
22
22
}
23
23
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ resource "kafka_topic" "comms-eqdb-loader-events" {
10
10
}
11
11
12
12
resource "kafka_topic" "disputes-diffs-events" {
13
- name = " disputes-diffs.events"
13
+ name = " disputes-diffs.events"
14
14
replication_factor = 3
15
15
partitions = 10
16
16
config = {
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ resource "kafka_topic" "invoice_fulfillment" {
2
2
name = " bex.internal.bill_fulfilled"
3
3
replication_factor = 3
4
4
partitions = 10
5
- config = {
5
+ config = {
6
6
# keep data for 7 days
7
- " retention.ms" = " 604800000"
7
+ " retention.ms" = " 604800000"
8
8
# allow max 1 MB for a message
9
9
" max.message.bytes" = " 1048576"
10
10
" compression.type" = " zstd"
@@ -16,9 +16,9 @@ resource "kafka_topic" "invoice_fulfillment_deadletter" {
16
16
name = " bex.internal.accountreadytobefulfilled_deadletter"
17
17
replication_factor = 3
18
18
partitions = 10
19
- config = {
19
+ config = {
20
20
# keep data for 14 days
21
- " retention.ms" = " 1209600000"
21
+ " retention.ms" = " 1209600000"
22
22
# allow max 1 MB for a message
23
23
" max.message.bytes" = " 1048576"
24
24
" compression.type" = " zstd"
Original file line number Diff line number Diff line change @@ -154,11 +154,11 @@ resource "kafka_topic" "iam_revoked_v1" {
154
154
name = " auth.iam-revoked-v1"
155
155
replication_factor = 3
156
156
partitions = 1
157
- config = {
157
+ config = {
158
158
# retain 100MB on each partition
159
- " retention.bytes" = " 104857600"
159
+ " retention.bytes" = " 104857600"
160
160
# keep data for 7 days
161
- " retention.ms" = " 604800000"
161
+ " retention.ms" = " 604800000"
162
162
# allow max 1 MB for a message
163
163
" max.message.bytes" = " 1048576"
164
164
" compression.type" = " zstd"
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ resource "kafka_acl" "kafka_ui_group" {
17
17
}
18
18
19
19
resource "kafka_acl" "kafka_ui_cluster" {
20
- resource_name = " kafka-cluster"
21
- resource_type = " Cluster"
22
- acl_principal = " User:CN=pubsub/kafka-ui"
23
- acl_host = " *"
24
- acl_operation = " All"
25
- acl_permission_type = " Allow"
20
+ resource_name = " kafka-cluster"
21
+ resource_type = " Cluster"
22
+ acl_principal = " User:CN=pubsub/kafka-ui"
23
+ acl_host = " *"
24
+ acl_operation = " All"
25
+ acl_permission_type = " Allow"
26
26
resource_pattern_type_filter = " Literal"
27
27
}
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ resource "kafka_acl" "mirror_maker_group_access" {
17
17
}
18
18
19
19
resource "kafka_acl" "mirror_maker_cluster_access" {
20
- resource_name = " kafka-cluster"
21
- resource_type = " Cluster"
22
- acl_principal = " User:CN=pubsub/mirror-maker"
23
- acl_host = " *"
24
- acl_operation = " All"
25
- acl_permission_type = " Allow"
20
+ resource_name = " kafka-cluster"
21
+ resource_type = " Cluster"
22
+ acl_principal = " User:CN=pubsub/mirror-maker"
23
+ acl_host = " *"
24
+ acl_operation = " All"
25
+ acl_permission_type = " Allow"
26
26
resource_pattern_type_filter = " Literal"
27
27
}
Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ resource "kafka_topic" "otlp_spans" {
19
19
}
20
20
21
21
module "otel_collector" {
22
- source = " ../../modules/tls-app"
23
- produce_topics = [kafka_topic . otlp_spans . name ]
22
+ source = " ../../modules/tls-app"
23
+ produce_topics = [kafka_topic . otlp_spans . name ]
24
24
cert_common_name = " otel/collector"
25
25
}
26
26
27
27
module "tempo_distributor" {
28
- source = " ../../modules/tls-app"
29
- consume_topics = {(kafka_topic.otlp_spans.name): " processor-tempo" }
28
+ source = " ../../modules/tls-app"
29
+ consume_topics = { (kafka_topic.otlp_spans.name) : " processor-tempo" }
30
30
cert_common_name = " otel/tempo-distributor"
31
31
}
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ resource "kafka_topic" "pubsub_examples" {
2
2
name = " dev-enablement.pubsub-examples"
3
3
replication_factor = 3
4
4
partitions = 10
5
- config = {
5
+ config = {
6
6
# retain 100MB on each partition
7
- " retention.bytes" = " 104857600"
7
+ " retention.bytes" = " 104857600"
8
8
# keep data for 2 days
9
- " retention.ms" = " 172800000"
9
+ " retention.ms" = " 172800000"
10
10
# allow max 1 MB for a message
11
11
" max.message.bytes" = " 1048576"
12
12
" compression.type" = " zstd"
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ resource "kafka_acl" "kafka_ui_group" {
17
17
}
18
18
19
19
resource "kafka_acl" "kafka_ui_cluster" {
20
- resource_name = " kafka-cluster"
21
- resource_type = " Cluster"
22
- acl_principal = " User:CN=pubsub/kafka-ui"
23
- acl_host = " *"
24
- acl_operation = " All"
25
- acl_permission_type = " Allow"
20
+ resource_name = " kafka-cluster"
21
+ resource_type = " Cluster"
22
+ acl_principal = " User:CN=pubsub/kafka-ui"
23
+ acl_host = " *"
24
+ acl_operation = " All"
25
+ acl_permission_type = " Allow"
26
26
resource_pattern_type_filter = " Literal"
27
27
}
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ resource "kafka_topic" "iam_cerbos_audit_v1" {
5
5
6
6
config = {
7
7
# retain 100MB on each partition
8
- " retention.bytes" = " 104857600"
8
+ " retention.bytes" = " 104857600"
9
9
# keep data for 2 days
10
- " retention.ms" = " 172800000"
10
+ " retention.ms" = " 172800000"
11
11
# allow max 1 MB for a message
12
12
" max.message.bytes" = " 1048576"
13
13
" compression.type" = " zstd"
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ resource "kafka_topic" "pubsub_examples" {
9
9
" retention.ms" = " 172800000"
10
10
# allow max 1 MB for a message
11
11
" max.message.bytes" = " 1048576"
12
- " compression.type" = " zstd"
13
- " cleanup.policy" = " delete"
12
+ " compression.type" = " zstd"
13
+ " cleanup.policy" = " delete"
14
14
}
15
15
}
16
16
@@ -24,8 +24,8 @@ resource "kafka_acl" "example_producer_topic_access" {
24
24
}
25
25
26
26
resource "kafka_quota" "example_producer_quota" {
27
- entity_name = " User:CN=pubsub/example-producer"
28
- entity_type = " user"
27
+ entity_name = " User:CN=pubsub/example-producer"
28
+ entity_type = " user"
29
29
config = {
30
30
# limit producing to 5 MB/s
31
31
" producer_byte_rate" = " 5242880"
@@ -53,8 +53,8 @@ resource "kafka_acl" "example_consume_process_individually_group_access" {
53
53
}
54
54
55
55
resource "kafka_quota" "example_consume_process_individually_quota" {
56
- entity_name = " User:CN=pubsub/example-consume-process-individually"
57
- entity_type = " user"
56
+ entity_name = " User:CN=pubsub/example-consume-process-individually"
57
+ entity_type = " user"
58
58
config = {
59
59
# limit consuming to 5 MB/s
60
60
" consumer_byte_rate" = " 5242880"
Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ resource "kafka_acl" "kafka_ui_group" {
17
17
}
18
18
19
19
resource "kafka_acl" "kafka_ui_cluster" {
20
- resource_name = " kafka-cluster"
21
- resource_type = " Cluster"
22
- acl_principal = " User:CN=pubsub/kafka-ui"
23
- acl_host = " *"
24
- acl_operation = " All"
25
- acl_permission_type = " Allow"
20
+ resource_name = " kafka-cluster"
21
+ resource_type = " Cluster"
22
+ acl_principal = " User:CN=pubsub/kafka-ui"
23
+ acl_host = " *"
24
+ acl_operation = " All"
25
+ acl_permission_type = " Allow"
26
26
resource_pattern_type_filter = " Literal"
27
27
28
28
depends_on = [kafka_acl . tf_applier_cluster ]
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ resource "kafka_topic" "pubsub_examples" {
12
12
" local.retention.ms" = " 3600000"
13
13
# allow max 1 MB for a message
14
14
" max.message.bytes" = " 1048576"
15
- " compression.type" = " zstd"
16
- " cleanup.policy" = " delete"
15
+ " compression.type" = " zstd"
16
+ " cleanup.policy" = " delete"
17
17
}
18
18
}
19
19
@@ -27,8 +27,8 @@ resource "kafka_acl" "example_producer_topic_access" {
27
27
}
28
28
29
29
resource "kafka_quota" "example_producer_quota" {
30
- entity_name = " User:CN=pubsub/example-producer"
31
- entity_type = " user"
30
+ entity_name = " User:CN=pubsub/example-producer"
31
+ entity_type = " user"
32
32
config = {
33
33
# limit producing to 5 MB/s
34
34
" producer_byte_rate" = " 5242880"
@@ -56,8 +56,8 @@ resource "kafka_acl" "example_consume_process_individually_group_access" {
56
56
}
57
57
58
58
resource "kafka_quota" "example_consume_process_individually_quota" {
59
- entity_name = " User:CN=pubsub/example-consume-process-individually"
60
- entity_type = " user"
59
+ entity_name = " User:CN=pubsub/example-consume-process-individually"
60
+ entity_type = " user"
61
61
config = {
62
62
# limit consuming to 5 MB/s
63
63
" consumer_byte_rate" = " 5242880"
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ resource "kafka_acl" "tf_applier_group" {
17
17
}
18
18
19
19
resource "kafka_acl" "tf_applier_cluster" {
20
- resource_name = " kafka-cluster"
21
- resource_type = " Cluster"
22
- acl_principal = " User:CN=pubsub/tf-applier"
23
- acl_host = " *"
24
- acl_operation = " All"
25
- acl_permission_type = " Allow"
20
+ resource_name = " kafka-cluster"
21
+ resource_type = " Cluster"
22
+ acl_principal = " User:CN=pubsub/tf-applier"
23
+ acl_host = " *"
24
+ acl_operation = " All"
25
+ acl_permission_type = " Allow"
26
26
resource_pattern_type_filter = " Literal"
27
27
}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ resource "kafka_acl" "producer_acl" {
34
34
resource "kafka_quota" "quota" {
35
35
entity_name = " User:CN=${ var . cert_common_name } "
36
36
entity_type = " user"
37
- config = {
37
+ config = {
38
38
" consumer_byte_rate" = tostring (var. consumer_byte_rate )
39
39
" producer_byte_rate" = tostring (var. producer_byte_rate )
40
40
" request_percentage" = tostring (var. request_percentage )
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ variable "request_percentage" {
49
49
type = number
50
50
description = " The percentage of requests a specified entity is allowed to make."
51
51
# Allow 100% of CPU. More on this here: https://docs.confluent.io/kafka/design/quotas.html#request-rate-quotas
52
- default = 100
52
+ default = 100
53
53
54
54
validation {
55
55
condition = var. request_percentage >= 0 && var. request_percentage <= 100
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ resource "kafka_topic" "complaints-eqdb-loader-events" {
15
15
partitions = 10
16
16
config = {
17
17
" retention.bytes" = " -1"
18
- " retention.ms" = " -1"
18
+ " retention.ms" = " -1"
19
19
" cleanup.policy" = " delete"
20
20
}
21
21
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ resource "kafka_topic" "account-debt-events" {
41
41
}
42
42
43
43
resource "kafka_topic" "debt-collection-events" {
44
- name = " debt-collection.events"
44
+ name = " debt-collection.events"
45
45
replication_factor = 3
46
46
partitions = 10
47
47
config = {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ resource "kafka_topic" "comms-eqdb-loader-events" {
10
10
}
11
11
12
12
resource "kafka_topic" "disputes-diffs-v1-events" {
13
- name = " disputes-diffs.v1-events"
13
+ name = " disputes-diffs.v1-events"
14
14
replication_factor = 3
15
15
partitions = 10
16
16
config = {
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ resource "kafka_topic" "invoice_fulfillment" {
2
2
name = " bex.internal.bill_fulfilled"
3
3
replication_factor = 3
4
4
partitions = 10
5
- config = {
5
+ config = {
6
6
# keep data for 7 days
7
- " retention.ms" = " 604800000"
7
+ " retention.ms" = " 604800000"
8
8
# allow max 1 MB for a message
9
9
" max.message.bytes" = " 1048576"
10
10
" compression.type" = " zstd"
@@ -16,9 +16,9 @@ resource "kafka_topic" "invoice_fulfillment_deadletter" {
16
16
name = " bex.internal.accountreadytobefulfilled_deadletter"
17
17
replication_factor = 3
18
18
partitions = 10
19
- config = {
19
+ config = {
20
20
# keep data for 14 days
21
- " retention.ms" = " 1209600000"
21
+ " retention.ms" = " 1209600000"
22
22
# allow max 1 MB for a message
23
23
" max.message.bytes" = " 1048576"
24
24
" compression.type" = " zstd"
Original file line number Diff line number Diff line change @@ -113,9 +113,9 @@ resource "kafka_topic" "iam_revoked_v1" {
113
113
name = " auth.iam-revoked-v1"
114
114
replication_factor = 3
115
115
partitions = 1
116
- config = {
116
+ config = {
117
117
# retain 100MB on each partition
118
- " retention.bytes" = " 104857600"
118
+ " retention.bytes" = " 104857600"
119
119
# keep data for 60 days
120
120
" retention.ms" = " 5184000000"
121
121
# allow max 1 MB for a message
You can’t perform that action at this time.
0 commit comments